unjs / ipx

🖼️ High performance, secure and easy-to-use image optimizer.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't pass sharp options

szafran89 opened this issue · comments

Environment

Node: v16.14.
IPX: 1.2.0

Reproduction

https://codesandbox.io/p/sandbox/sos-error-vtyzkv

Describe the bug

Can't pass configuration options form Nuxt image module to Sharp method.

Additional context

The image is not being displayed correctly; it returns a 500 error code. The displayed error message is "IPX Error: Error: VipsJpeg: Invalid SOS parameters for sequential JPEG" at https://vtyzkv-3000.csb.app/_ipx/f_webp&s_1024x683/images/invalid-sos.jpeg. I have verified that the Sharp module can handle this image by setting the options to 'failOn: 'error''. Currently, the options passed from the Nuxt image module are being sent to IPX, but they are not being forwarded to the Sharp method."

Logs

IPX Error: Error: VipsJpeg: Invalid SOS parameters for sequential JPEG

I have same problems.

Should be solved in next minor release