Skip to content
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

fix: handle withoutEnlargement for undefined height or width #10078

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Zhousiru
Copy link

What?

This patch implements the functionality in imageResizer to omit the generation of the image when either width or height is undefined and withoutEnlargement is set to undefined

Why?

#9986: withoutEnlargement doesn't work when height is undefined in upload.imageSizes

How?

This code checks if withoutEnlargement is undefined and either targetWidth or targetHeight is missing. If so, it further checks whether the target dimensions (if provided) are larger than the original image dimensions. If the target would enlarge the image, it returns 'omit', skipping the resizing to prevent enlargement

Fixes #9986

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

withoutEnlargement doesn't work when height is undefined in upload.imageSizes
1 participant