Skip to content

NextJs image optimization not working in Vercel production (400: BAD_REQUEST) with @payloadcms/storage-uploadthing #6704

Answered by poofy25
poofy25 asked this question in Q&A
Discussion options

You must be logged in to vote

I'm getting the same error when trying to display images in a Vercel deployment using a Supabase S3 bucket. Any solutions?

So i found a workaround for this issue all you gotta do is add the website url in the image src path
For example

Before:
<Image src={image.url} ...>

After
<Image src={${process.env.WEBSITE_URL}${image.url}} />

Replies: 8 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Dovchik
Comment options

Answer selected by poofy25
Comment options

You must be logged in to vote
2 replies
@denisprado
Comment options

@JosephClay
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
10 participants
Converted from issue

This discussion was converted from issue #6600 on June 10, 2024 13:09.