I'm using amazon s3 as CDN, everything is working fine when I run the application using 'yarn dev'(domain added to next config). If I check inspect I can see the following value in the src attribute of the img element:
src="/_next/image?url=https://cf-simple-s3-origin-gallery-hior-021672050205.s3.us-east-2.amazonaws.com/slidesImages/logo.png&w=640&q=75"
When I'm running 'yarn build & yarn start' the src attribute set as the following: src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
which causing the issue loading the images, what am I missing here?
CodePudding user response:
though this is probably not the issue, I had a similar problem, just make sure that if you are using ReactJS to have className
instead of class
CodePudding user response:
I was able to find the root cause for that issue(also reproduced with static images). I added an unnecessary config variable inside the component which disabled the React client-side and causing the loading issue. export const config = { unstable_runtimeJS: false, };