Next.js Discord

Discord Forum

Image Component not Rendering some urls

Answered
African Slender-snouted Crocodil… posted this in #help-forum
Open in Discord
African Slender-snouted CrocodileOP
I am building a photo gallery app and I have my urls coming in from the s3 bucket and the links all work but the image component seem not to be able to render some images especially when the files are like 2mb upwards... Attached is a photo of my Image component, some error messages and the rendered page
Answered by B33fb0n3
try to not serve your files thought s3. Instead serve them throught a CDN like Cloudfront (if you want to stay at AWS) or R2 or BunnyCDN or ... Else you get a huge bill at the end of the month. Most of them also optimize the image size and with that your initial problem should be solved
View full answer

6 Replies

@African Slender-snouted Crocodile I am building a photo gallery app and I have my urls coming in from the s3 bucket and the links all work but the image component seem not to be able to render some images especially when the files are like 2mb upwards... Attached is a photo of my Image component, some error messages and the rendered page
try to not serve your files thought s3. Instead serve them throught a CDN like Cloudfront (if you want to stay at AWS) or R2 or BunnyCDN or ... Else you get a huge bill at the end of the month. Most of them also optimize the image size and with that your initial problem should be solved
Answer
African Slender-snouted CrocodileOP
Okay thanks... let me check that out and get back
African Slender-snouted CrocodileOP
Currently setting up Cloudfront to get in sync with my s3
African Slender-snouted CrocodileOP
Hey @B33fb0n3 . It worked... got Cloudfront in sync... improved everything massively, thanks:1000:
happy to help