User tests: Successful: Unsuccessful:
Pull Request for Issue #36533 [Solves no 2 of the 3 reported problems, the thumbs ].
Media manager loads a thumb
Media manager Loads the full image
From a code point of view, the decision was to place the thumbs in a subfolder of the media folder called cache_mm
The reason that I didn't reuse the existing cache
folder is simple: Joomla cleans that folder on each update and we WANT the thumbs to persist on updates (they are static files so PHP/JS/CSS/db changes are largely irrelevant).
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Plugins |
Labels |
Added:
?
|
/me still waits for the day when there are no path issues in one of your pr
FWIW this is not the subfolder issue but me modifying the path string in a UNIX way (obviously fails for fat/ntfs)
No its not a unixfs thing you are mixing up the JPATH_ROOT and the uri:root
I doubt it would work on any filesystem
JPATH_ROOT : C:\htdocs\joomla-cms
Uri::root() : http://localhost/joomla-cms/
still no joy
I did something similar in DPMedia. But made resized only 10 images per request. The other ones I do serve with with a placeholder image. On large image folders it takes too much resources on shared hosting and ended up with broken thumbnails.
PS if we have thumbnails do we still need lazyload?
PS if we have thumbnails do we still need lazyload?
Yes, the thumbnails fix the bandwidth problem, the lazyloading fixes the UI responsiveness (eg view the file thumbs quicker).
Still the pagination or streaming is missing to fix the enormous lists (the actual number might not be that big on a cheap server). As I said this is a 3 fold problem...
Category | Front End Plugins | ⇒ | Administration Language & Strings Front End Plugins |
The reason that I didn't reuse the existing cache folder
Please use /media/cache/com_media
as cache.
On update Joomla will clear a root /cache
and should not clear /media/cache
, otherwise it a bug to me.
Other thing: have to ensure a thumbnail exists (and create it if not) on request, not only while upload.
This way it will be easy to refresh whole cache in case of any failure.
Other thing: have to ensure a thumbnail exists (and create it if not) on request,
It's already like that
otherwise it a bug to me.
The last time I've checked, Joomla clears the media cache but I can change it no debate here
EDIT: @Fedik I switched the cache folder to 'media/cache/com_media/thumbs/' . $this->filePath
where $this->filePath
is the local adapter, eg images
.
Someone needs to confirm that Joomla is not emptying the media/cache
folder on updates otherwise this is completely wrong, an update should not invalidate the thumbnails...
Labels |
Added:
Language Change
|
Feedback is welcome here (especially if you have a huge images
folder to test it against)
Category | Front End Plugins Administration Language & Strings | ⇒ | Administration Language & Strings Libraries Front End Plugins |
On
On
? , but I guess it is a CS issue
Hmm, not really, the no adapter test fails with these changes but I couldn't figure out why by looking at the tests (didn't debug)
500 errors are hard to figure out, had the same issue with the web service pr. It was a folder permission thing at that time.
Uploading results in The image file does not exist.
as if the uploading failed. However, refreshing the page shows the image.
The thumbnail is still blurry.
http://localhost/Joomla_4.1.0-dev-pr.36552-Development-Full_Package/administrator/index.php?option=com_media&format=json&mediatypes=0,1,2,3&task=api.files&path=local-images:/
[HTTP/1.1 500 Internal Server Error 201ms]
Testing locally on Windows with XAMPP.
Uploading results in The image file does not exist. as if the uploading failed. However, refreshing the page shows the image.
What's the background-image
URL for the missing thumbnail?
The thumbnail is still blurry.
The thumbnails size is configurable (not sure if I added the form options but the rest of the code is there) but generally speaking the thumbs should be small so a bit of blurriness might be acceptable (personal opinion)
The thumbnail URL is fine. It is the error message that is displayed after uploading.
The thumbnails size is configurable (not sure if I added the form options but the rest of the code is there) but generally speaking the thumbs should be small so a bit of blurriness might be acceptable (personal opinion)
The blurriness is due to the thumbnail at 100px and stretched/pixelated at zoom 2 (194px). So maybe make the default thumbnail be 200x200?
zoom 1 (min) = 141px
zoom 2 (default) = 194px
zoom 3 = 298px
zoom 4 (max) = 612px
Uploading a .txt file displays this message Unable to get properties for the image.
.
Deleting an image does not delete its thumbnail.
Do a fresh install.
Go to Media.
No images displayed.
Go to /media/cache/com_media/thumbs/images
No images created.
Same as uploading new images.
It works with new/edit images, but not existing images.
It works with new/edit images, but not existing images.
If you refresh the page the images appear? Is this some sort of race condition?
On a clean install, thumbnails are not generated. Uploading/editing images create thumbnails. The issue is with the initial installation.
The issue is with the initial installation.
What are the URLs for the background-image on the missing images?
There are no thumbnails generated in /media/cache/com_media/thumbs/images with the initial installation.
Sorry it is still a no go. :(
Nothing is displayed.
We're making progress...
@bembelimen can you give a verdict on this one? Is it something that you're interested in for 4.1?
If so someone needs to help me with the API tests failures here
Missing /
before the filename.
http://localhost/Joomla_4.1.0-dev+pr.36552-Development-Full_Package/media/cache/com_media/thumbs/imagesjoomla_black.png?1642367942093
Missing / before the filename.
Is that for the tests or on your local machine?
Sorry no go. Thumbnails are generated. Just missing / before the filename in the thumbnail URL.
It is ok in the main folder but not in subfolders. Missing / after banners folder.
http://localhost/Joomla_4.1.0-dev+pr.36552-Development-Full_Package/media/cache/com_media/thumbs/images/bannersosmbanner1.png?1642371757494
Category | Front End Plugins Administration Language & Strings Libraries | ⇒ | Administration Language & Strings Libraries Front End Plugins Unit Tests |
Labels |
Added:
?
|
@Quy @Fedik and everyone else involved here: first of all thanks for all the code reviews, feedback and testing but we're too late for 4.1...
This needs to be postponed to 4.2 or if the maintainers feel that it could go on a patch on a 4.1.x
That said I won't be the one driving this feature so feel free to fork the work done here and patch anything still missing, buggy, etc
Thanks!
Title |
|
Labels |
Added:
?
Removed: ? |
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-02-03 15:24:14 |
Closed_By | ⇒ | dgrammatiko |
/me still waits for the day when there are no path issues in one of your pr
<div class="image-cropped" style="background-image: url("http://localhost/joomla-cms/C:/htdocs/joomla-cms/images/sampledata/parks/landscape/120px_pinnacles_western_australia.jpg?1641240738875");"></div>