Next.js Discord

Discord Forum

Image optimization is not working when deployed, locally works fine

Unanswered
Giant Chinchilla posted this in #help-forum
Open in Discord
Giant ChinchillaOP
So I have simple code as that
import CONFERENCES_GRADIENT from '../../../public/images/landing/conferences-gradient.png';


<NextImage src={CONFERENCES_GRADIENT} alt="Hero cover" />

locally it works fine, but when i deploy it on staging/uat/production, it doesn't render anything...
any clue?

11 Replies

@Ray where do you deploy?
Giant ChinchillaOP
@Ray https://discord.com/channels/752553802359505017/1190671824296607744/1192659895120572647 check this
Giant ChinchillaOP
I doubt its that :/

if you can see images below are also coming from /_next/ folder
he can't get it work on Plesk with next 14
he needs to revert back to 13
I don't know what is the issue on Plesk, I have never used it
@Ray yeah read OP message
Giant ChinchillaOP
hey, i have reverted the version to 13.4.2, so that issue is fixed, images are loaded, but not optimized
they are still in .png format, its only in production, can you take a look?
https://staging.underline.io/
i have sharp installed