Netlify Next.js images throw IPX Error 500

Hi @hillary

I face the same error when building locally on a Mac using the plugin version 4.2.7.

Will it become mandatory to build on Linux or directly on Netlify to solve this issue? Or is there still a way to solve this and build directly on Mac?

Thank you

Hey @686,

At this point, the error should not be occuring any more. So if you’re seeing it, we would appreciate if you can share links like the ones requested above.

1 Like

Hi this is still broken for us

I noticed that when the image url is resolved to _ipx/… the image is displayed correctly

and nextimg/… is not displayed correctly

Hi @hrishikesh

Sorry for my late reply, but the notification mail ended up up in m spam folder.

Here is the link to the error IPX Error (500) image

https://mwsrbm.netlify.app/_ipx/w_384,q_75/%2F_next%2Fstatic%2Fmedia%2Flogo.194f4ac1.png?url=%2F_next%2Fstatic%2Fmedia%2Flogo.194f4ac1.png&w=384&q=75

When I deploy the same code from Github all works well.

Hey folks–

Thanks for reaching out. Can you both share a link to your site as well as your project repo? We will need these specifics in order to look into this error further for you, as this should have been fixed last week.

Hi @hillary

Just uploaded a mini demo which demonstrates the error. Source code at: GitHub - liefra/nettmp

I use the following command to build and deploy from my Mac: netlify deploy --build --prod

Logs: Netlify App
Unique Deploy URL: https://6239b3e9823799461a727f2d--imagefnekngkengkjerngkjgnkejn.netlify.app
Website URL: https://imagefnekngkengkjerngkjgnkejn.netlify.app

The website has one image in the blue header. Only the blurred preview image is displayed. The main image resolves to a 500 error.

Please let me know if you need more details. Thank

Hey there, @686 :wave:

Can you please try upgrading your version of the next plugin to our latest? This may address the error you are seeing. You can read more here:

Hi @hillary

Thank you for your reply. Just gave it another try with the next plugin version 4.3.0, but the error is still there.

Logs: Netlify App
Unique Deploy URL: https://623b2bac38824d0075d18212--imagefnekngkengkjerngkjgnkejn.netlify.app
Website URL: https://imagefnekngkengkjerngkjgnkejn.netlify.app

Do you maybe have other ideas what I could try?

We faced the same issue after updating @netlify/plugin-nextjs, the problem seems to be since they switched to ipx

In our particular case we have a proxy so we needed to update our rules to include the new _ipx endpoint.

Another issue we faced was with the content-type of our resources, we used to return content-type: binary/octet-stream but they introduced this magnificent check here causing all our images to break, so we needed to adjust.

I hope this findings can help anyone having similar issues.

2 Likes

Same problem here.
Master branch get deployed fine from CI, but deploying from my local MacOS machine yields broken images. I’m using Essential Next.js 4.3.0 Plugin.
I’m using pnpm exec netlify deploy --build to deploy locally.
Repo - GitHub - gamliela/website: My personal website. Playing around with serverless and micro-frontends implementation.
Website - https://gamliela.com/
Broken deploy example - https://623e989358aa856e895d74e1--gamliela-website.netlify.app/

1 Like

Hey folks, by reading the latest comments, I think the issue only occurs when trying to deploy from CLI, correct? Did I miss someone who is having this issue with deploying from Netlify Build pipeline? If so, please let me know.

About the CLI problem, it seems to be a little tough to handle. Node.js installs platform-specific binary for Sharp. So when you use in on devices other than Linux-based OSs, you’d face this problem as AWS Lambda runs Linux-based dependencies. So when you bundle from CLI, the macOS or Windows-specific dependency doesn’t work there and thus the issue.

We’d try to come up with a solution to tackle this, but I believe, at this point your options are:

  1. Build using Netlify Build
  2. Use some other Linux-based build system like GitHub Actions and publish the deploy to Netlify.
3 Likes

Thank you for that clarification. Then we will go ahead and make use of a Linux-based build system to solve this issue

1 Like

Thanks for that clarification! may I add that updating the docs is essential. After all, the stack of Next.js, Images, macOS and CLI deployment is pretty common IMO.

3 Likes

Hey there, @gamliela :wave:

Thanks for chiming in! I have shared your feedback with the appropriate teams.

1 Like

Hello all,
I am currently facing this issue also when using version 4.7.1 of the plugin and building from cli on MacOS.

If any logs can be of help, I’m more than happy to provide them as I hope this issue can be solved.

Hey @jorgebef,

Thank you for chiming in. As mentioned before, this has been shared with the teams in charge, however having a solution in place is going to be difficult because there are multiple variables involved in this that are outside Netlify’s control. The team is still working to see if this can be worked around.

1 Like

Just one thing I noticed that may be useful.
I don’t encounter the issue with SVG images. It doesn’t matter if it is a true SVG or if it’s simply a bitmap inside an SVG.
It might be a temporary and very dirty workaround for some, just putting it out there for the team to maybe see why some formats don’t have ipx error out as it might shed some light on the subject.
Thank you for your reply!

Thanks for the info. That should be helpful to the engineers.

Thank you for your work on the issue, I hope it can be fixed or provide an alternative.

Just one thought is maybe using a Docker container which uses the appropriate versions to build and deploy to Netlify.

Is there a Docker image that you are able to provide that is officially supported or any tips to get there?

Thank you in advance!

Yeah, we do have a Docker image which you can use to build locally:

https://hub.docker.com/r/netlify/build

However, as far as I’m aware, that cannot be used to deploy to production.

About the issue, since the old logs are not available any more, could any one of you provide us with a recent reproduction? We want to confirm if the log messages are same as the previous issues to hopefully steer this in the right direction.