Replies: 1 comment 3 replies
-
I guess the issue you are getting is that the |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Hi, I am working on next js + payload project, I connect s3 bucket as so:
s3Storage({ collections: { media: true }, bucket: process.env.S3_BUCKET || "", config: { credentials: { accessKeyId: process.env.S3_ACCESS_KEY_ID || '', secretAccessKey: process.env.S3_SECRET || '', }, region: "auto", endpoint: process.env.S3_ENDPOINT, } })
Although I can upload images correctly via payload's admin panel, those images do not load on the webiste.
I have to tweak the Image loader as so:
<Image alt={prod?.name} fill loader={(url) => { return url.src }} src={prod.image?.url || "/placeholder.png"} className="object-cover"/>
But I guess it will have implications that I lose some optimizations for the images. What is correct way of handling image urls from s3 bucket?
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions