[5.3] - Respect individual width/height constraints in Media Action - Resize plugin#45311
Merged
richard67 merged 8 commits intojoomla:5.3-devfrom Apr 19, 2025
Merged
Conversation
QuyTon
reviewed
Apr 10, 2025
QuyTon
reviewed
Apr 10, 2025
Co-authored-by: Quy Ton <quy@nomonkeybiz.com>
|
I have tested this item ✅ successfully on b9a54b0 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45311. |
QuyTon
reviewed
Apr 14, 2025
Co-authored-by: Quy Ton <quy@nomonkeybiz.com>
QuyTon
reviewed
Apr 14, 2025
Contributor
|
I have tested this item ✅ successfully on 09d2249 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45311. |
1 similar comment
Contributor
|
I have tested this item ✅ successfully on 09d2249 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45311. |
Contributor
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45311. |
Member
|
Thanks all (author and testers). |
richard67
added a commit
to richard67/joomla-cms
that referenced
this pull request
Apr 23, 2025
… Resize plugin (joomla#45311) Fix issue joomla#44862 in the Media Action - Resize plugin where images are resized unnecessarily when only one dimension (width or height) is set. The logic has been updated to evaluate width and height independently. The plugin now only resizes if the image exceeds a defined constraint. --------- Co-authored-by: Quy Ton <quy@nomonkeybiz.com> Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request for Issue #44862
Summary of Changes
This pull request resolves a bug in the Media Action - Resize plugin where images are resized unnecessarily when only one dimension (width or height) is set.
Previously, if a user defined only a max width (e.g., 1920px) and left height unset, the plugin would still resize small images (e.g., 200px wide). This occurred because the height check defaulted to 0, incorrectly failing the comparison logic.
The logic has been updated to evaluate width and height independently. The plugin now only resizes if the image exceeds a defined constraint.
Testing Instructions
Actual result BEFORE applying this Pull Request
Images smaller than the defined max width or height are still resized if one constraint is not set.
Expected result AFTER applying this Pull Request
Images are only resized if they exceed a defined max width or height. Unset dimensions are ignored in the check, preventing unnecessary resizing.
Link to documentations
Please select: