When you enter the Media
manager in the Сontrol Panel
, and there you see 1000 images in a folder, the site page takes a very long time to load.
I suggest to automatically add tag loading="lazy"
to every image that is shown in the Media
manager in the Control Panel
.
I've seen this already done as a frontend plugin and it works great. I suggest doing the same for the Control Panel
(Media
).
On my site, which is now on Joomla 3.9, there are folders in which there are 1000 images and when I go to these folders, the site page loads for a very, very long time, sometimes even the browser freezes.
Labels |
Added:
?
|
lazy loading is not the magic solution to a design mistake.
When you enter the Media manager in the Сontrol Panel, and there you see 1000 images in a folder, the site page takes a very long time to load.
There is simply no point in loading 1000 (eg: All images in the folder) images at a time - that is the root performance problem here that should be addressed with pagination.
you don't even understand what the people who have a news site are doing. Joomla is not WordPress and if you constantly create new news on the site and upload images using drag and drop from the desktop to the article, then the folder with images can easily contain more than 1000 images if 1000 news were added to the site.
there are no 1000 images on any page of my site (frontend), I understand that it is too much for one page of the site.
but we're not talking about the frontend !!! we are talking about backend, about a folder where all images are automatically added (Control Panel - Media), which the editor drags from his work computer into the article. do you understand that?
have you ever made a news site? do you understand what it is? I do not have time for each news to create a new folder for the image to the news, I just drag the image from the desktop and then publish the news on the site.
Even if lazy loading of the images happened - there would still be 1000 html img tags in the source, driving up page size and load time of an Ajax request
Believe it or not, this tag really helped me very well (when I installed the backport plugin for Joomla 3) and now all the pages of the site load for users much faster and in the Google speed test my pages also load faster.
But we're not talking about the front-end. Sometimes I still go to the backend and when I open a folder with images, it takes a very, very long time to load and I'm not the only one who drags images into the article from the desktop. New folders are not automatically created for images when you constantly drag and drop them from the desktop and create new news on the site (perhaps in other CMS this is so, but not in @joomla).
You misunderstood what @PhilETaylor was saying. He is referring to the media manager trying to load all the photos in a folder in one go. He is stating that this is an architecture problem that should be fixed with having some pagination. Just as you dont list all 10,000 articles in article manager he is saying that you should do the same in media manager.
Personally I use one of the very many extensions available that will let me automatically store uploaded images either by data (like wp) or by user.
You misunderstood what @PhilETaylor was saying. He is referring to the media manager trying to load all the photos in a folder in one go. He is stating that this is an architecture problem that should be fixed with having some pagination. Just as you dont list all 10,000 articles in article manager he is saying that you should do the same in media manager.
Personally I use one of the very many extensions available that will let me automatically store uploaded images either by data (like wp) or by user.
This is the problem, even you have to use a third party extension.
I have done several thousand articles over the years and have added about 1 or 2 images to each article. Naturally, I did not upload these images via FTP
or Media
manager (this is very inconvenient). I just created a new article and drag and drop the image for the article from my desktop of my computer. This way I have a couple of thousand images in one folder, because all the images from my computer's desktop have been automatically downloaded to the same folder over the years.
I guess I am not the only one who uses @joomla and have this problem. I didn't upload 1000 images in one go, but this has happened over many years and several thousand articles.
To be honest, I never thought that at one point it would become a big problem to open the Media
manager in the Control Panel
, because it is not normal when absolutely all images in the browser that are in this folder are loaded immediately, although in at the top of the list I only see a few images and thousands of images are being loaded. A logical solution would be to add this attribute loading="lazy"
to all images that the administrator opens in the Media
manager in the Control Panel
. Don't even need a plugin for that, just add a few new lines of code to CMS admin files, right?
@brianteeman plugin Content - Lazy Loading Images
, which was made officially for @joomla, helped me a lot. now almost all pages on my site are glowing green for @google, because there are categories on my site where 50 or 100 articles are published on one page and each article has 1 image. this plugin really helped very well with my site's loading speed. if earlier 50 images were immediately loaded on the page, now only the first 3-4 images are loaded when entering the page. it's fantastic!
and now I think that this attribute loading="lazy"
can also help very well to comfortable view images in a Media
manager (Control Panel
).
loading
attribute only works with <img>
tags. Therefore not a solution at all for this issue.<div class="image-cropped" style="background-image: url("https://j4.illovo.de/images/dumm-wie-kruppstahl_2014.jpg");"></div>
mediamanager.js
in Joomla 4. It's hard to debug mediamanager.min.js
(and override). I will open a seperate issue for that.and now I think that this attribute loading="lazy" can also help very well to comfortable view images in a Media manager (Control Panel).
No. Read my last comment, please.
If I would be a more clever JS developer I would think about an loading on(scroll..)
solution or something. I'm sometimes happy to be stupid... ;-)
This is the problem, even you have to use a third party extension.
That's the entire point of joomla. Specific needs are catered for by extensions
you don't even understand what the people who have a news site are doing
Im sorry - you are wrong. I know EXACTLY what people with a new site are doing. I know EXACTLY what this problem is... here is one of the sites I look after
Here is another
Both these sites have considerably more than 1000 images in a folder.
have you ever made a news site?
Yes - see above.
do you understand what it is?
Yes - see above.
go to the backend and when I open a folder with images, it takes a very, very long time to load
Yes, for a start it has to download and parse and then render the HTML for all the images - lazy loading or not - the HTML DOM is still downloaded FIRST even if the image content is lazy loaded.
Without lazy loading, the page size ITSELF can be considerable - using the stats above, several Gb in size for a single page load!
I'm not saying lazy loading will not help, Im saying its not the correct solution to the architectural problem of loading all 1091736
images (or more specifically 1091736
div tags with styles having backgorund images, in HTML, in the document.
To be honest, I never thought that at one point it would become a big problem to open the Media manager in the Control Panel, because it is not normal when absolutely all images in the browser that are in this folder are loaded immediately,
That was the point I was making. I was agreeing with you. Its not normal to load ALL of ANYTHING anywhere. Pagination and Search should be used for any "thing" that otherwise could create unlimited amount of entries. We do this with Articles, Tags, Users, Dropdown select boxes.
Where we disagree is that you think LL is a solution. Its not. Its a sticky plaster over a decapitated limb.
Lazy loading only masks part of the problem and will only mask the problem up until a finite point. 1000 images is a low number
Lazy loading is NOT pagination.
Pagination and/or search should be employed on ANY entity that has an infinite number of items.
This is the problem, even you have to use a third party extension.
That's the entire point of joomla. Specific needs are catered for by extensions
I understand this, but still, everything related to working with articles (com_content
), I think, can be developed within the framework of the @joomla kernel. it's not an online store or slider, gallery, forum or something like that. this is the same basic functionality for adding articles to the site.
to be honest, it would be a good rule to continue to develop a tool for adding articles to the site (articles, categories, tags, media manager). and leave the rest to the developers of third-party extensions. that would be a really good position for the CMS.
even for example such things as user registration (com_users
) could be done by a third-party component and the same can be said about the component for contacts (com_contact
) and banners (com_banners
).
but the main thing is that everything related to articles (com_content
, com_categories
& com_media
) should be developed within the framework of the main version of the CMS.
No one is disagreeing with you here.
Lazy loading is NOT pagination.
That would also be a good solution, I didn’t say I’m against pagination. I am looking for a way so that all 1000 images are not loaded in one go.
It could be pagination + image search string (so as not to go to page 150). This would be a good solution.
And the last thing - I am not a developer, I am a Joomla user. If I were a developer, then I could make my own CMS. I hope you understand this ??
When I created this theme, I didn't know that it was impossible to add attribute loading="lazy"
for images in the Media
manager (Control Panel
). But in any case, we must find a solution for this problem, when 1000 images are loaded at once on one page.
It could be pagination or something else. One way or another, but this is already provided in @joomla, if you publish all the articles
as a list (or as blog) - then there is a pagination so as not to show 1000 articles on one page. Something similar could be done for images in the Media
manager (plus an image search string).
As stated before - there are solutions available. You just chose not to use them.
Labels |
Added:
No Code Attached Yet
J4 Media Manager
Removed: ? |
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-01-05 07:39:26 |
Closed_By | ⇒ | alikon |
lazy loading is not the magic solution to a design mistake.
There is simply no point in loading 1000 (eg: All images in the folder) images at a time - that is the root performance problem here that should be addressed with pagination.
Even if lazy loading of the images happened - there would still be 1000 html img tags in the source, driving up page size and load time of an Ajax request