Replies: 2 comments
-
|
Are you dual deploying to both? It sounds like this is an issue with Netlify's support for Next.js. You might have better luck opening an issue here so the maintainers know 👍 |
Beta Was this translation helpful? Give feedback.
-
|
In my case, I was facing issues with Next.js Image component adding the export const config = {
matcher: ['/((?!_next/image).*)'],
}This prevents the middleware from interfering with Next.js image optimization; This way, Next.js can still handle image optimization natively without issues. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using the next/image component and locally it loads external images correctly, however I have just deployed to netlify and it is not loading external images.
The src looks the same both locally and on netlify, do I need to change anything in the config?
src
<img alt="5 Pcs/set Deluxe Wine Accessories Gift Set" src="/_next/image?url=https%3A%2F%2Fimages-na.ssl-images-amazon.com%2Fimages%2FI%2F715ITM21ujL._AC_SL1500_.jpg&w=1200&q=75" decoding="async" class="Product__StyledImage-jcje5z-7 fGaLBM" style="visibility: visible; position: absolute; top: 0px; left: 0px; bottom: 0px; right: 0px; box-sizing: border-box; padding: 0px; border: none; margin: auto; display: block; width: 0px; height: 0px; min-width: 100%; max-width: 100%; min-height: 100%; max-height: 100%;" srcset="/_next/image?url=https%3A%2F%2Fimages-na.ssl-images-amazon.com%2Fimages%2FI%2F715ITM21ujL._AC_SL1500_.jpg&w=640&q=75 1x, /_next/image?url=https%3A%2F%2Fimages-na.ssl-images-amazon.com%2Fimages%2FI%2F715ITM21ujL._AC_SL1500_.jpg&w=828&q=75 2x, /_next/image?url=https%3A%2F%2Fimages-na.ssl-images-amazon.com%2Fimages%2FI%2F715ITM21ujL._AC_SL1500_.jpg&w=1200&q=75 3x">Product.js
next.config.js
Beta Was this translation helpful? Give feedback.
All reactions