I recently attempted to deploy a WIP site for a client using Next.js and netlify, I’m using next/image for almost all images on the site and for .png’s it works fine. However, for some reason .svg’s seem to not be loading at all. Looking in the network logs they seem to receive a 502 on request
I have the Essential Next.js plugin on the site and am not doing anything revolutionary in my build process or image loading. As I said other image formats seem to load fine (ans .svg’s work when not loaded through next/image) - it’s just .svg’s and I can’t seem to find any other forum posts with the same issue, any help is appreciated - thanks
It looks like this thread has been quiet for the past few days. Are you still encountering this issue? If you are, let us know what you have tried in the interim. Additionally, please link your repo and your Netlify site name.
This has solved the issue for us, although the SVGs load painfully slow compared to the other image formats. There is over a second delay. Has anybody else had issues with this?
Using the priority tags for the next/images has helped a little bit as this prevents the extra delay from lazy loading, but ultimately this is still really slow compared to pre-optimising images and just loading them directly. The ‘middleman’ optimiser service is adding noticeable overhead regardless, as discussed on this post;
@JC-Darwin hey! this should be fixed in our most recent release (but our plugin isn’t defaulting to that version quite yet). can you manually install at 3.6.2 and let us know if that fixes your issue? thanks! npm install --save @netlify/plugin-nextjs@3.6.2