-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix: prevent resizing of original file with withoutEnlargement on update
#12291
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: prevent resizing of original file with withoutEnlargement on update
#12291
Conversation
…l-file-resize-without-enlargement-update
…l-file-resize-without-enlargement-update
|
please approve. 😆 |
|
@PatrikKozak I tried your PR by modifying the build-generated While the dimensions do not change anymore, it still tries to compress the image on update. See video: |
|
@dreamy32 Thanks for bringing the above to my attention! I was able to reproduce the behavior and I'm currently looking into it |
…l-file-resize-without-enlargement-update
…l-file-resize-without-enlargement-update
|
🚀 This is included in version v3.39.0 |
This PR updates
generateFileDatato skip applyingresizeOptionsafter updating an image ifresizeOptions.withoutEnlargementistrueand the original image size is smaller than the dimensions defined inresizeOptions.This prevents unintended re-resizing of already resized images when updating or modifying metadata without uploading a new file.
This change ensures that:
Resizing is skipped if withoutEnlargement: true
Resizing still occurs if withoutEnlargement: false or unset
This resolves an issue where images were being resized again unnecessarily when updating an upload.
Fixes #12280