-
-
Notifications
You must be signed in to change notification settings - Fork 564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webp images are being processed and come out 10x larger #1975
Comments
Could you try asking the same question at the https://github.com/SixLabors/ImageSharp repo as we have no control over what happens inside the actual image processing. The current version of Piranha uses the latest released version of ImageSharp ( If you open an issue there, please reference this issue and make sure to include the code that seems to do the faulty processing, i.e: using (var image = Image.Load(source, out IImageFormat format))
{
image.Mutate(x => x.AutoOrient());
image.Save(dest, format);
} A workaround would be to remove the default registration in App.MediaTypes.Images.Add(".webp", "image/webp", false); |
Hi Håkan, I will make a post of this as instructed and I can confirm your workaround works perfectly. Thanks for your speedy help.
Thanks
Thomas.
From: Håkan Edling ***@***.***>
Sent: Friday, 27 January 2023 7:32 PM
To: PiranhaCMS/piranha.core ***@***.***>
Cc: Thomas Gregg ***@***.***>; Author ***@***.***>
Subject: Re: [PiranhaCMS/piranha.core] Webp images are being processed and come out 10x larger (Issue #1975)
Could you try asking the same question at the https://github.com/SixLabors/ImageSharp repo as we have no control over what happens inside the actual image processing. The current version of Piranha uses the latest released version of ImageSharp (2.1.3) but maybe there is a bug on their side related to this.
If you open an issue there, please reference this issue and make sure to include the code that seems to do the faulty processing, i.e:
using (var image = Image.Load(source, out IImageFormat format))
{
image.Mutate(x => x.AutoOrient());
image.Save(dest, format);
}
A workaround would be to remove the default registration in App.MediaTypes.Images and add it back with image processing disable with
App.MediaTypes.Images.Add(".webp", "image/webp", false);
—
Reply to this email directly, view it on GitHub<#1975 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AISZ3WU6OH6FP4UI5F7CCJLWUOIZPANCNFSM6AAAAAAUICSPT4>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
@tidyui I have raised an issue over at ImageSharp and they have referenced a couple of other issues that seem to resolve the issue. Is there something that needs to be done like defining the encoding configuration? |
Hi there! As far as I know this bug has been fixed in Best regards |
Sounds like this was the bug with lossless encoding (since no quality was specified when saving). It was backported to 2.x in https://github.com/SixLabors/ImageSharp/releases/tag/v2.1.4 so just updating to that (or rather 2.1.6 which has some security fixes as well) should solve this. |
Fixed in commit be0c6da |
piranha.core/core/Piranha.ImageSharp/ImageSharpProcessor.cs
Line 147 in a605dc5
As per the title when we upload an image in webp format, the resulting image comes out roughly 10 times bigger. We have not seen this for other image formats
The text was updated successfully, but these errors were encountered: