#images not loading

1 messages · Page 1 of 1 (latest)

gentle burrowBOT
#

Hi @peak pagoda. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Based on the information you've provided, it seems like your images are not loading when you deploy your Next.js application to AWS. This could be due to a variety of reasons, but let's try to troubleshoot based on the knowledge sources provided.

Firstly, ensure that your AWS S3 bucket is correctly configured and that the images are indeed present in the bucket. You can verify this by directly accessing the image URL in your browser.

Secondly, check your next.config.js file. In the Github Issue (https://github.com/vercel/next.js/issues/62167) related to images not loading in NextJS 14 Headless WordPress demo fresh install, it was mentioned that the next.config.js file needed to be updated for the images to load correctly. The user had to add parameters like swcMinify: true, optimizeFonts: true, and minimumCacheTTL: 15000000 for it to work. Also, the hostname "secure.gravatar.com" was added because profile avatars on the latest WordPress are handled by Gravatar.

In your case, you might need to add similar configurations or adjust the existing ones in your next.config.js file.

Lastly, ensure that your environment variables are correctly set in your AWS Amplify setup. If the environment variables are not correctly set, it could lead to issues with loading images.

If none of these solutions work, it would be helpful to have more information or error messages to further diagnose the issue.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: