? NPM Resource Changed ? Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
19 Aug 2022

Summary of Changes

Since #36930 the thumbnail image of a media item is an image HTML element. When the width and height are 0, then the image is rendered with 0 width/height and invisible. Instead of the attributes should be ignored. This pr adds no attribute when width and height are not available and sets loading not to lazy.

Testing Instructions

  • Remove the lines 342 and 343 in plugins/filesystem/local/src/Adapter/LocalAdapter.php
  • Open the media manager in the back end

Actual result BEFORE applying this Pull Request

No preview image is visible, because it has width and height of 0.

Expected result AFTER applying this Pull Request

A preview image is shown with no width/height/loading attribute.

avatar laoneo laoneo - open - 19 Aug 2022
avatar laoneo laoneo - change - 19 Aug 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Aug 2022
Category Administration com_media NPM Change
avatar laoneo laoneo - change - 19 Aug 2022
The description was changed
avatar laoneo laoneo - edited - 19 Aug 2022
avatar laoneo laoneo - change - 20 Aug 2022
Labels Added: NPM Resource Changed ?
avatar brianteeman
brianteeman - comment - 20 Aug 2022

After rebuilding the media manager I can confirm this works

BUT - in what scenario would the image ever have a height/width of 0?

avatar laoneo
laoneo - comment - 21 Aug 2022

When you fetch data from an external service like FTP, then there is no image information. Since 4.1 a width/height attribute is required as int value, the adapter has to return at least 0. You can try it with the free version of DPMedia and the FTP adapter.

avatar brianteeman
brianteeman - comment - 21 Aug 2022

I have tested this item successfully on 4c87bcb

Thanks for explaining the use case


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

avatar brianteeman brianteeman - test_item - 21 Aug 2022 - Tested successfully
avatar viocassel
viocassel - comment - 21 Aug 2022

I have tested this item successfully on 4c87bcb


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

avatar viocassel viocassel - test_item - 21 Aug 2022 - Tested successfully
avatar richard67 richard67 - change - 21 Aug 2022
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 21 Aug 2022

RTC


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

avatar laoneo laoneo - change - 22 Aug 2022
Labels Added: ?
avatar roland-d roland-d - change - 2 Sep 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-09-02 19:15:08
Closed_By roland-d
avatar roland-d roland-d - close - 2 Sep 2022
avatar roland-d roland-d - merge - 2 Sep 2022
avatar roland-d
roland-d - comment - 2 Sep 2022

Thank you

Add a Comment

Login with GitHub to post a comment