Niels-IO / next-image-export-optimizer

Use Next.js advanced <Image/> component with the static export functionality. Optimizes all static images in an additional step after the Next.js static export.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remote image optimization fails if content-type contains charset parameter

itrich opened this issue · comments

Hi,

we're currently running into the issue that if a remote image https://test.com/foo.jpg responds with the content-type content-type: image/jpeg;charset=UTF-8, the image will be locally saved as foo.jpg.jpeg;charset=UTF-8. This breaks the optimization of the remote image and no WEBP images are generated.

I guess that we need to further split the string if the imageFormat string contains a semicolon.

You can reproduce the issue with this remote image.

Best wishes,

Eduard

Hi @itrich,

I addressed this issue in #169 just now.

Let me know how that works in v1.8.4

Wow, I'm really impressed. Thank you for providing a fix for this super fast!
I can confirm that #169 resolves this issue. 🎉