Search…

X3 Photo Gallery Support Forums

Search…
 
cinte
Topic Author
Posts: 8
Joined: 05 Dec 2020, 01:53

pre Image resize button

12 Dec 2020, 03:19

Hi
is it possible to add a button which can generate resized images for those images without resized image. Because it consume a lot of time to generate resized images during viewing when I upload hundreds of photos one time.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: pre Image resize button

12 Dec 2020, 03:55

cinte wrote:is it possible to add a button which can generate resized images for those images without resized image. Because it consume a lot of time to generate resized images during viewing when I upload hundreds of photos one time.
I don't see the logic. It won't go any faster to pre-create than to create-on-demand. And what exactly do you mean "consume a lot of time"? That would be if you insist on visiting all galleries to create the resized images. Why not let that be handled "on demand" by ANY visitor as your pages get requested? The resizing will get spread out. Besides, "resized images" may exist in 6-7 variations, but it depends on your layout and the devices that load the gallery. Different screen sizes and pixel densities may request different resized versions ... it doesn't make sense to pre-create ALL resized versions of an image, because it will create files that might never get requested, and will be slow and consume too much space on your server.

I really don't see the benefit of what you ask. Why do you need to waste time and space pre-creating all thumbnails?
 
cinte
Topic Author
Posts: 8
Joined: 05 Dec 2020, 01:53

Re: pre Image resize button

12 Dec 2020, 05:26

mjau-mjau wrote:
cinte wrote:is it possible to add a button which can generate resized images for those images without resized image. Because it consume a lot of time to generate resized images during viewing when I upload hundreds of photos one time.
I don't see the logic. It won't go any faster to pre-create than to create-on-demand. And what exactly do you mean "consume a lot of time"? That would be if you insist on visiting all galleries to create the resized images. Why not let that be handled "on demand" by ANY visitor as your pages get requested? The resizing will get spread out. Besides, "resized images" may exist in 6-7 variations, but it depends on your layout and the devices that load the gallery. Different screen sizes and pixel densities may request different resized versions ... it doesn't make sense to pre-create ALL resized versions of an image, because it will create files that might never get requested, and will be slow and consume too much space on your server.

I really don't see the benefit of what you ask. Why do you need to waste time and space pre-creating all thumbnails?
I have a relatively poor CPU on my server, and when I browse one of my own albums with about 100 images, I find that a lot of CPU resources are used to generate thumbnails, which slows down the server response and takes longer to generate many thumbnails at the same time than if the images were presented directly. I migrated from piwigo, which used to have a plugin that had a pre-generated thumbnail button, so that the first visit would not degrade the experience because of the need to generate thumbnails. So I would like to see if imagevue has a similar feature.
(I only use this site to manage and view my own images at all times and share them with friends, so hardly anyone else visits)
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: pre Image resize button

12 Dec 2020, 10:40

cinte wrote:I have a relatively poor CPU on my server, and when I browse one of my own albums with about 100 images, I find that a lot of CPU resources are used to generate thumbnails, which slows down the server response and takes longer to generate many thumbnails at the same time than if the images were presented directly.
It won't be faster though. Once those images are created ONCE (by you or the other first visitor to the page), the images will be cached. The advantage of having them created on-demand:
  • Resized images will get created as they are required. Many sizes are not required.
  • Resized images will get created by one or multiple visitors. Basically the first request that is made to a specific image and size.
  • Resizing images on-demand will allow server to allocate resources for resources only when resized versions are requested.
  • X3 will only create images that are actually USED on your website. For example, X3 uses 6-7 different image sizes, but only 2-3 might ever be created, depending on your layout and the screens/devices that visit the page. Creating ALL resized versions of an image will be much slower, creating and storing images that will never get requested.
My opinion is that this is backwards, tedious and dysfunctional. Do you have a link to an image on your website? It would be interesting to see how long it takes to resize and process a standard web-friendly image.

As soon as images are resized ONCE, by any visitor, the images are cached and will load fast anyway. If there was to be an option for this, you would need to process thumbnails every time you made a new upload, or renamed a file, or even renamed a folder. In total, it is slower, less practical, and the "first" slowness effect would affect FIRST visitor (and only if nobody has visited any of the pages before).

I don't know piwigo, but likely it only has 1-2 resized versions of each image? It's an interesting suggestion, but I feel this solution is a bit outdated. I would be interested to see an example of how slow your server creates resized images.