User tests: Successful: Unsuccessful:
This Pull Request is for issue #36533 [Solves no 2 of the 3 reported problems, the thumbs] and is a rewrite for #36552 created by @dgrammatiko.
Please refer to the original PR if you want to follow the discussions about the implementation.
The general idea is that image thumbnails are created in the Media Manager and those thumbnails are cached, increasing performance especially when a large amount of images is processed.
The thumbnail creation is 'off' by default.
Go to the FileSystem - Local plugin and set 'Create thumbnails' to 'Yes' on the 'images' folder.
The media manager loads full size images.
The media manager loads a thumbnail image (max width or height of 200px).
Please select:
Documentation link for docs.joomla.org: https://docs.joomla.org/Chunk4x:Extensions_Plugin_Manager_Edit_FileSystem_Group
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org: joomla/Manual#59
No documentation changes for manual.joomla.org needed
Status | New | ⇒ | Pending |
Category | ⇒ | Administration Language & Strings Libraries Front End Plugins Unit Tests |
Labels |
Added:
?
Language Change
PR-4.3-dev
|
Category | Administration Language & Strings Libraries Front End Plugins Unit Tests | ⇒ | Administration Language & Strings Libraries Front End Plugins |
Labels |
Removed:
?
|
Hey, @obuisard I can't reply on #38722 as Nik has blocked me so I'll write my comment here:
Thank you Dimitris @dgrammatiko. I did address the first review, fixed formatting and tested the code successfully.
As far as the tests are concerned, a solution would be to remove testUpdateFileWithoutAdapter all together, but I would appreciate someone's expertise on this.
Removing the test is a bad idea. Better to set the default to 0, so no thumbs will be generated and the admin has to activate it. If it is on by default, then after the update all thumbnails are generated without notice, which can lead to resource issues on large sites.
Labels |
Added:
Documentation Required
|
I have tested this item
Everything looks good after applying the PR.
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Labels |
Added:
?
|
First comment on this PR was edited by the bot, removing information.
Thank you to @dgrammatiko for this work, it's a big step into improving the performance of the media manager.
For information, turning on thumbnails can be found in the Filesystem 'Local' plugin.
Joomla 4 documentation found at https://docs.joomla.org/Chunk4x:Extensions_Plugin_Manager_Edit_FileSystem_Group
Status | Ready to Commit | ⇒ | Pending |
Back to pending because changes were made and more changes were requested.
Labels |
Removed:
?
|
I have tested this item
Everything retested well. No issues.
I have tested this item
in my test the images were already thumbnailed without the PR. This was " The currently installed Joomla! version is "4.3.0-dev"4.3.0-dev"
with the latest composer & npm.
plugin setting did not exist w/o the pr as expected.
Media manager image Without PR..
image with pr
in my test the images were already thumbnailed without the PR.
That's strange. The thumbnails created with the PR should be 200x200.
@obuisard what @N6REJ is showcasing is the SIZE of the container DIV, not the size of the image. To get the size of the image open the browser tools, select the image in the elements tab and in the console type
$0.naturalWidth
(or naturalHeight for the height). False alarm...
Oh good catch Dimitris @dgrammatiko! @N6REJ can you double-check? Thank you!
I have tested this item
retested as instructed.
Status | Pending | ⇒ | Ready to Commit |
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-01-20 00:50:42 |
Closed_By | ⇒ | obuisard | |
Labels |
Added:
?
|
A big thank you to Dimitris @dgrammatiko and the testers !
Documentation added
@obuisard I haven't checked but is the thumbnails functionality bypasses the svg files? If not it needs to do so, the thumbs helper expects only files that the Image class can handle. I'll try to check the next days if I get some free time
@dgrammatiko I have checked SVG and image thumbnail creation and both work well together. The image.php
file specifies which image file formats can be treated by the GD library .
it's sad that we are using GD instead of imagemagick.
it's sad that we are using GD instead of imagemagick.
I know, but GD is more widely installed than imagick. It would be great to offer the use of either one of those graphic libraries in Joomla.
You'll be surprised but GD (PHP 8.1+) is (median) faster than imagick. How do I know? I keep testing these for responsive-images
@dgrammatiko faster but I thought imagick quality was far higher?
tests/Codeception/api/com_media/MediaCest.php needs to be updated and fails at this point.