-
Notifications
You must be signed in to change notification settings - Fork 2.4k
resizeOptions
ignore withoutEnlargement
/fit
for original file on *update*
#12280
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
Comments
Please add a reproduction in order for us to be able to investigate. Depending on the quality of reproduction steps, this issue may be closed if no reproduction is provided. Why was this issue marked with the
|
@PatrikKozak I brought modifications to the post, my example was misleading. I asked Github Copilot to do the ticket for me, I had to finish my shift earlier. If you need further details, I am at your disposition. |
Look the following video for the full reproduction of the issue: 2000.image.converted.to.6000.on.update.mp4 |
Hey @dreamy32! Thanks for all the details and video reproduction - this is very helpful and I'll be working on a fix for this today |
Thanks Patrik for your fast and full commitment to this issue. Our team at Auto-Canada is very grateful! |
I answered on the PR: New issue arised following PR
|
Describe the Bug
This appears to be an issue related to PR #10078 which fixed applying
resizeOptions
to the original file on upload.While the fix correctly applied
resizeOptions
to original files during initial upload (create), when updating/replacing an existing image, the constraintswithoutEnlargement: true
andfit: 'inside'
are ignored, though otherresizeOptions
likewidth
are still applied.This leads to smaller images being inappropriately enlarged when they shouldn't be. For example, an image file with dimensions such as 512x512px results in it being saved as 6000px wide if
resizeOptions.width: 6000
is set, despite havingwithoutEnlargement: true
. (DURING UPDATE)The current workaround is to remove the top-level
resizeOptions
, but this prevents us from downsizing large images, which was the intended purpose of PR #10078. We need both behaviors: downsizing large images while preventing small images from being enlarged.The issue occurs with this configuration when updating an image:
Link to the code that reproduces this issue
See above snippet. (or see this gist for full Media collection: Media.ts
Reproduction Steps
upload
settings above.withoutEnlargement
andfit
.resizeOptions.width
(6000px wide).Which area(s) are affected? (Select all that apply)
Not sure
Environment Info
The text was updated successfully, but these errors were encountered: