Skip to content
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

No WebP decoder in V5 #468

Open
TristanPct opened this issue May 29, 2024 · 1 comment
Open

No WebP decoder in V5 #468

TristanPct opened this issue May 29, 2024 · 1 comment

Comments

@TristanPct
Copy link

I'm trying to update from V4 to V5 and I'm having issues with the WebP decoder.
I followed the migration guide and removed all references to V4 before installing V5.

Now, if I request /image.jpg?width=500&format=webp I have a resized WebP image, fine.
But if I request /image.webp?width=500 or /image.webp?format=jpeg the original image is served.

Similar issue using the programmatic API, if I call ImageResizer.ImageBuilder.Current.Build with a WebP source image I get the following exception:

ImageResizer.ImageCorruptedException (0x80004005): File may be corrupted, empty, or may contain a PNG image with a single dimension greater than 65,535 pixels. ---> System.ArgumentException: Le paramètre n'est pas valide.
   à System.Drawing.Bitmap..ctor(Stream stream, Boolean useIcm)
   à ImageResizer.ImageBuilder.DecodeStream(Stream s, ResizeSettings settings, String optionalPath)
   à ImageResizer.ImageBuilder.LoadImage(Object source, ResizeSettings settings, Boolean restoreStreamPos)
   à ImageResizer.ImageBuilder.LoadImage(Object source, ResizeSettings settings, Boolean restoreStreamPos)
   à ImageResizer.ImageBuilder.BuildJob(ImageJob job)
   à ImageResizer.ImageBuilder.BuildInternal(ImageJob job)
   à ImageResizer.ImageBuilder.BuildInQueue(ImageJob job, Boolean useSemaphore, Int32 maxQueuingMilliseconds, CancellationToken cancel)
   à ImageResizer.ImageBuilder.Build(ImageJob job)

Works fine with JPEG.

@lilith
Copy link
Member

lilith commented Jun 6, 2024

You need the Imageflow plugin for v5 webp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants