HTTP 500 "Invalid URL" error response on optimized static image requests

xdn-version=2.35.1

I’m receiving HTTP status code 500 with an error message stating “Invalid URL: /directory/file.jpg” when using the Next.js Image component with a static file sourced from the /public directory. I believe it to be an issue with the XDN image optimizer but am not sure as everything works outside of XDN.

Example:

Static file: https://scvl-nextjs-commerce-default.moovweb-edge.io/images/moovweb.jpeg
Optimized URL: https://scvl-nextjs-commerce-default.moovweb-edge.io/_next/image?url=%2Fimages%2Fmoovweb.jpeg&w=384&q=75

Thank you for reporting this. The image optimizer doesn’t support relative paths - we are looking into adding the support.

1 Like

Internal ticket has been created to track the progress on this. Updates will be posted as soon as possible
Ticket #: XDN-7904

A fix has been pushed for this image optimizer issue. Your link https://scvl-nextjs-commerce-default.moovweb-edge.io/_next/image?url=%2Fimages%2Fmoovweb.jpeg&w=384&q=75 now works as expected.

1 Like