Next.js Discord

Discord Forum

Image processing in prod is sometimes corrupting images

Unanswered
European anchovy posted this in #help-forum
Open in Discord
European anchovyOP
We have a screenshot of our product on our landing page, frec.com, but we've noticed that the 2x resolution version is often corrupt. The drop-shadow in the PNG is just dithered black. If I try other sizes it looks fine, but the bad one seems to be cached. Why would this happen? We're hosting and building on aws. We're using sharp 0.31.1, nextjs 13.2.4. Can't repro locally.

4 Replies

Try messing around with quality and priority props on the Next/Image component. Otherwise open a issue on GitHub repo
European anchovyOP
I'm also loading via CloudFront. Unsure if that affected the file, but I just invalidated the cache there and it's fixed now.
Probably a issue on that Front(badum tss) then ig
European anchovyOP
lol. If the rest of you all aren't seeing it often, then you're probably right. Just a randomly bad cache value. Good.