RTC PR-5.3-dev Pending

User tests: Successful: Unsuccessful:

avatar travisrisner
travisrisner
10 Apr 2025

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

  1. Enable the plugin Media Action - Resize.
  2. Set Maximum Width to 1920. Leave Maximum Height empty.
  3. Upload a small image via Media Manager (e.g., 200x300px).
  4. Observe that before the patch, the image was resized unnecessarily.
  5. Observe that after the patch, the image is not resized if not necessary.
  6. Optionally test with only height set and both width and height set.

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:

  • Documentation link for docs.joomla.org:
  • No documentation changes for docs.joomla.org needed
  • Pull Request link for manual.joomla.org:
  • No documentation changes for manual.joomla.org needed

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar travisrisner travisrisner - open - 10 Apr 2025
avatar travisrisner travisrisner - change - 10 Apr 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 10 Apr 2025
Category Front End Plugins
avatar travisrisner travisrisner - change - 10 Apr 2025
Labels Added: PR-5.3-dev
avatar exlemor exlemor - test_item - 11 Apr 2025 - Tested successfully
avatar exlemor
exlemor - comment - 11 Apr 2025

I have tested this item ✅ successfully on b9a54b0

I have tested this successfully (with both only height set and both width and height set). Thanks @travisrisner!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45311.

avatar QuyTon QuyTon - test_item - 18 Apr 2025 - Tested successfully
avatar QuyTon
QuyTon - comment - 18 Apr 2025

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.

avatar alikon alikon - test_item - 18 Apr 2025 - Tested successfully
avatar alikon
alikon - comment - 18 Apr 2025

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.

avatar alikon alikon - change - 18 Apr 2025
Status Pending Ready to Commit
avatar alikon
alikon - comment - 18 Apr 2025

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45311.

avatar QuyTon QuyTon - change - 18 Apr 2025
Labels Added: RTC
avatar richard67 richard67 - change - 19 Apr 2025
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-04-19 15:00:47
Closed_By richard67
avatar richard67 richard67 - close - 19 Apr 2025
avatar richard67 richard67 - merge - 19 Apr 2025
avatar richard67
richard67 - comment - 19 Apr 2025

Thanks all (author and testers).

Add a Comment

Login with GitHub to post a comment