Open Nick-Mazuk opened 4 years ago
Can confirm, I'm hitting netlify timeout build time (25min) with just a few images on 3.0.0-canary.10
.
For anyone reading this thread now, I ended up switching to the new next/image component in NextJS 10.0.0 https://nextjs.org/docs/api-reference/next/image
Been using it for about a week and it's working wonderfully.
NextJs solution is far from perfect and has plenty of troubles:
Etag
, you can't override this behavior!important
to overwriteNext/Image
component results in 3 to 4 DOM nodes per image, which bloat the DOM if using multiple imagesdiv
s, so if you use in a p
tag, you're semantically incorrectContent-Security-Policy
headerWe do need an alternative because NextJs solution isn't rosy as soon as you dig a little deeper.
I'm experiencing some similar performance issues as mentioned in https://github.com/cyrilwanner/next-optimized-images/issues/169 but with the most current build.
I have gotten the same error occasionally, but more often, images will just take forever to build during development. Small images are near-instant, though anything above 500x500 pixels seems to take a few minutes for each image. I even just clocked a single image taking 12 minutes to process.
Any ideas about what could be causing the slow optimization times?
Just to rule out a few possibilities:
3.0.0-canary.10
If the slow build times are unavoidable, here are a few suggestions to help for development:
I literally have no idea how feasible this would be, so if it's not possible, no worries! And of course, this would only be for development.
Thanks for everything!