Comments (7)
Here (https://github.com/payloadcms/payload/discussions/6704#discussioncomment-9821934),
I opened the same exact issue about a month prior.
Basically the workaround I found is to give a website url before the image url
For example
Before:
<Image src={image.url} ...>
After
<Image src={${process.env.WEBSITE_URL}${image.url}} />
from payload.
Here (https://github.com/payloadcms/payload/discussions/6704#discussioncomment-9821934), I opened the same exact issue about a month prior.
Basically the workaround I found is to give a website url before the image url
For example
Before:
<Image src={image.url} ...>
After
<Image src={${process.env.WEBSITE_URL}${image.url}} />
Here (https://github.com/payloadcms/payload/discussions/6704#discussioncomment-9821934), I opened the same exact issue about a month prior.
Basically the workaround I found is to give a website url before the image url
For example
Before:
<Image src={image.url} ...>
After
<Image src={${process.env.WEBSITE_URL}${image.url}} />
Unfortunately this approach does not worked for me.
from payload.
Worked for me using Aws s3 adapter (I guess it will be not necessary) and adding the parâmeter loader={() => src}
to the Images components.
from payload.
<Image
src={`${process.env.NEXT_PUBLIC_URL}${image.url}`}
/>
This approach is working for me. I am using Vercel Blob store, Vercel Postgres and beta 53.
from payload.
Worked for me using Aws s3 adapter (I guess it will be not necessary) and adding the parâmeter
loader={() => src}
to the Images components.
As far as I know, a custom loader that just returns the image url disables Vercel image optimization.
from payload.
Worked for me using Aws s3 adapter (I guess it will be not necessary) and adding the parâmeter
loader={() => src}
to the Images components.As far as I know, a custom loader that just returns the image url disables Vercel image optimization.
May be, but if I only disable the optimization for entire app, the error continues.. with loader, the error stopped.
from payload.
Now, I am using an s3 bucket and an image loader like this:
const imageLoader = ({ src, width, quality }: ImageLoaderProps) => { const params = [
w=${width}]; if (quality) { params.push(
q=${quality}); } const paramsString = params.join("&"); return
https://${process.env.S3_BUCKET}.s3.${process.env.S3_REGION}.amazonaws.com/${src}?${paramsString}; };
to achieve image optimization. I don't think this is fully integrated with Payload's image sizes, but it makes it viable to continue using it.
from payload.
Related Issues (20)
- Doesn't show popup when adding a new document on relationship field with autosave enabled
- Performance problems with collections listview and api
- Upload collections don't use gallery view
- React Datepicker showing white background in theme dark mode.
- Email Header issue HOT 3
- Duplicate identifier 'GeneratedTypes'.ts(2300) in blank project HOT 8
- Getting error when using search plugin HOT 3
- db-postgres: `is like` filter condition does case-insensitive text search and the result is equivalent to `contains` filter
- SVG favicon not supported by Safari
- Overwriting file uploads doesn't update URL HOT 2
- req.locale incorrect for access control functions
- No additional image sizes are generated on image upload while using "imageSizes" HOT 2
- Update Unlock Documentation to Include Email Parameter
- 504 Gateway Timeout with Form Fields large data
- [UI] Document deletion modal: Content misalignment
- Relationship field is of type number | MyType
- Next.js Middleware not working in Custom Server example after build process
- Image metadata stripped from image when using upload.imageSizes
- Type signature mismatch between auth email configurations
- Fields in groups ignore typical table naming convention (postgres)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from payload.