Open LunatikDev opened 9 months ago
hi! just wanted to mention that in my case, i also had to add a secondary parameter for Gravatar on top of the changes that you made:
{
protocol: "http",
hostname: "2.gravatar.com",
}
Hi @LunatikDev ,
how did you implement this step?
Create a bare minimum custom WordPress theme, consisting of only 2 files:
Unpacking the package…
Installing the theme…
The package could not be installed. Template is missing. Standalone themes need to have a templates/index.html or index.php template file. Child themes need to have a Template header in the style.css stylesheet.
Theme installation failed.
Verify canary release
Provide environment information
Which example does this report relate to?
cms-wordpress
What browser are you using? (if relevant)
Chrome 121.0.6167.185
How are you deploying your application? (if relevant)
Vercel, local
Describe the Bug
I tried to deploy "cms-wordpress" template on vercel.com and when you access the project website the images are not displaying.
I followed the steps exactly as shown here: ISR Blog with Next.js and WordPress
I did set the env variables when i deployed on Vercel and all of the data loads fine but the images are not working.
When run locally i get the following error : Error: Invalid src prop on is not configured under images in your
next/image
, hostnamenext.config.js
See also this discussion: Images not loading in NextJS 14 Headless WordPress demo fresh install #62163
Expected Behavior
The expected behavior is that the images works out-of-the-box, below is how i fixed it:
The provided next.config.js is this: it doesn't work!
It should be changed to this: next.config.js Without the parameters:
swcMinify: true, optimizeFonts: true, minimumCacheTTL: 15000000
It will not work!
Also the hostname "secure.gravatar.com" should be added because profile avatars on latest wordpress are handled by gravatar !
To Reproduce
Error: Invalid src prop on is not configured under images in your
next/image
, hostnamenext.config.js