Images Not Loading on Production Domain in Vercel

On the production domain in Vercel, images fail to load, displaying a 400 (Bad Request) error, while they work fine on the preview deployment (v0). Even if i revert back to the version on which they were working still facing the same issue.

Error from console

Hi @hrithik-singh07, welcome to the Vercel Community!

Sorry that you are facing this issue. Can you share the deployed website link?

If possible, can you also share a link to the public v0 chat?

Chat Link

https://v0.dev/chat/kanegi-webapp-v7-cxB3cQTsYGP

Deployed Website Link Below

Hi @hrithik-singh07, thanks but for the v0 chat link you’ve to select Public when sharing because right now it is showing as private and I can’t see any content.

I have made it public now can you check

Hi @hrithik-singh07, I am able to recreate your issue. I’m discussing with the team how to resolve it.

Are you able to pull your project locally?

i havent runned it yet locally allthough i have tried downloading the creating new chat/project but the issue still presists

1 Like

Hi there! Same issue https://v0-gestion-de-rentas.vercel.app/ any fix?

Hi there, we’re actively investigating the issue to see how to resolve it.

I’ll keep you posted when we hear anything.

@reservas-brujastower I don’t see any image on the above url. Can you share the link of the image?

@hrithik-singh07 Have you tried deploying without cache? Troubleshooting Build Errors

So sorry, try out now: https://v0-gestion-de-rentas.vercel.app/
Image URL is: https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?q=80&w=2075&auto=format&fit=crop

Avatars are also related issue? In preview looks ok but no when deployed

This is because you are trying to load an image from Unsplash and it’s block by CSP

You need to make sure CSP header is added so you can embed image from third party source Content Security Policy (CSP) - HTTP | MDN

2 Likes

Got it! Working now, thanks a lot, any recommendation for the avatars between preview and production after deployed? In preview avatars looks ok but in production mode it seems gray.


2 Likes

SOLVED, thank you! It was also CSP restrictions

2 Likes

We are closing this thread now. If anyone still having trouble to deploy image with v0 deployment. Please create a new thread so we can investigate individually. Thank you all for reporting this!