You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to create image sizes like 1000w, 2000w, etc., to use with srcset. I hope that when the original image size is smaller than the corresponding thumbnail width, the thumbnail won't be generated (this seems to be the behavior when withoutEnlargement is undefined)
Also, I want to keep the original image's aspect ratio. After setting the height to undefined, I encountered an issue where, regardless of the image's width, it always enlarges the image and generates thumbnails in all sizes
I tried setting withoutEnlargement to true, but this led to the creation of duplicate-sized images, which does not meet my requirements 🥲
Describe the Bug
I want to create image sizes like
1000w
,2000w
, etc., to use withsrcset
. I hope that when the original image size is smaller than the corresponding thumbnail width, the thumbnail won't be generated (this seems to be the behavior whenwithoutEnlargement
isundefined
)Also, I want to keep the original image's aspect ratio. After setting the
height
toundefined
, I encountered an issue where, regardless of the image's width, it always enlarges the image and generates thumbnails in all sizesI tried setting
withoutEnlargement
totrue
, but this led to the creation of duplicate-sized images, which does not meet my requirements 🥲Here is my
Media.ts
configuration:And reproduction repo here
Link to the code that reproduces this issue
https://github.com/Zhousiru/payload-repro-2
Reproduction Steps
test-image.jpg
(600x400, available in reproduction repo) to the media collectionAnd here is the screen recording:
repro.mp4
Which area(s) are affected? (Select all that apply)
area: core
Environment Info
The text was updated successfully, but these errors were encountered: