-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
imageCacheTag does not check URL for already present parameters #10139
Comments
barthy-koeln
added
status: needs-triage
Possible bug which hasn't been reproduced yet
validate-reproduction
labels
Dec 23, 2024
This was referenced Dec 23, 2024
github-actions
bot
removed
the
status: needs-triage
Possible bug which hasn't been reproduced yet
label
Dec 30, 2024
Thanks for your repro, I think the linked issues are relevant but not the exact same fix. I've outlined the solution in the related PR. |
🚀 This is included in version v3.17.0 |
This issue has been automatically locked. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the Bug
Same error as #9880 and #9993 however I can provide a reproducer.
Summary of the error:
In
packages/ui/src/elements/Thumbnail/index.tsx
The recently introduced
imageCacheTag
gets appended to an image URL.It should check the URL for parameters and append to the parameters list with
¶m=value
instead of a simple?param=value
.Use-case: I am using a
/_next/image?url=https.....jpg&w=384&q=75
URL to generate thumbnails for remotely hosted images.Appending a
?cacheTag=...
breaks the integer parsing for the quality param in next, and will break other hosting services like AWS S3, CloudFront CDN, ...Link to the code that reproduces this issue
https://github.com/barthy-koeln/payload-repro-cachetag-param
Reproduction Steps
Use the existing user in the sqlite DB (
[email protected]
as name and pw) or create a new one.Upload a new Media item, then navigate to its edit page (you should be there after the upload anyway).
The thumbnail is broken.
Which area(s) are affected? (Select all that apply)
area: ui
Environment Info
The text was updated successfully, but these errors were encountered: