Skip to content

[4.2] Turn background image in MM into an img element#36930

Merged
roland-d merged 12 commits intojoomla:4.2-devfrom
Digital-Peak:j42/media/lazy-images
Feb 10, 2022
Merged

[4.2] Turn background image in MM into an img element#36930
roland-d merged 12 commits intojoomla:4.2-devfrom
Digital-Peak:j42/media/lazy-images

Conversation

@laoneo
Copy link
Copy Markdown
Member

@laoneo laoneo commented Feb 3, 2022

Partial pull Request for Issue #36533.

Summary of Changes

Turns the element which shows an image in the media manager from a background div into a propper image element. Full credit for this pr goes to @dgrammatiko as he is the original author in #36550.

Testing Instructions

  • Open the media manager list with the local adapter.
  • Optionally you can also install the FTP adapter from DPmedia to test it with an external adapter.

Actual result BEFORE applying this Pull Request

Image is shown as background image.

Expected result AFTER applying this Pull Request

Image is shown as normal image with loading lazy attribute.

@Quy
Copy link
Copy Markdown
Contributor

Quy commented Feb 4, 2022

In browser's console when displaying an SVG image.

TypeError: this.item.thumb_path is undefined

@laoneo
Copy link
Copy Markdown
Member Author

laoneo commented Feb 4, 2022

Thanks @Quy , fixed it

@Quy
Copy link
Copy Markdown
Contributor

Quy commented Feb 4, 2022

The SVG should display by adding src and removing loading, width, and height attributes.

36930-thumbnail
36930-markup

@laoneo
Copy link
Copy Markdown
Member Author

laoneo commented Feb 4, 2022

All we have in the list is the thumb url, not the full url. But this issue also exists on the 4.2-dev branch. So it needs to be addressed separately. Because there is a general issue how to handle media without a thumbnail.
image

…s/browser/items/image.vue

Co-authored-by: Quy <quy@fluxbb.org>
@Quy
Copy link
Copy Markdown
Contributor

Quy commented Feb 8, 2022

I have tested this item ✅ successfully on 248ffe6


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

1 similar comment
@HarshJaiswani
Copy link
Copy Markdown

I have tested this item ✅ successfully on 248ffe6


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

@Quy
Copy link
Copy Markdown
Contributor

Quy commented Feb 9, 2022

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Feb 9, 2022
@Quy Quy added this to the Joomla 4.2.0 milestone Feb 9, 2022
@roland-d roland-d merged commit 1cf32fc into joomla:4.2-dev Feb 10, 2022
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Feb 10, 2022
@roland-d
Copy link
Copy Markdown
Contributor

Thank you,

@laoneo laoneo deleted the j42/media/lazy-images branch February 11, 2022 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NPM Resource Changed This Pull Request can't be tested by Patchtester

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants