why images stored in database and images folder create 3 copies ?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 13 años
when we store images in database, by default code creates 3 copies of image and save it to images/thumbs folder

The problem is just not limited with products, even if any member uploads avatar or admin upload images from HTML Editor, all images are saved in 3 different copies ? why ?

1st question: what's the idea behind creating 3 copies of same image ? If it is size then size can be controlled by code why saving 3 individual copies ?

2nd question: Is there any way to stop the code from creating 3 copies and saving only 1 copy ?
Hace 13 años
idea behind creating 3 copies: to reduce image size and dimensions. in listing use small dimensions like 125*125 and size reduce to 4 5k. so page dont get heavy.
Hace 13 años
[email protected] wrote:
idea behind creating 3 copies: to reduce image size and dimensions. in listing use small dimensions like 125*125 and size reduce to 4 5k. so page dont get heavy.


If this is the reason then on the other side it is making project heavy by increasing the project size as 3 images are getting stored on the disk or space provided on hosting server. So logically each image is taking 3 X times space on the server.
Hace 13 años
abcd_12345 wrote:


If this is the reason then on the other side it is making project heavy by increasing the project size as 3 images are getting stored on the disk or space provided on hosting server. So logically each image is taking 3 X times space on the server.


I think the original image size is stored in the database, in case you want to recreate the thumbnails.

Imagine the original image size to be 1000x1000.. That would be about 1Mb in storage (if it is a camera image) . If you create 3 different image thumbnails (600px , 300px and 125px) the total size of those three is less than or equal to the size of the original image (most of the times). So you gain in site speed and you have the opportunity to recreate the thumb sizes as many times you like from the stored image in the database.

Why recreate the images programmatically to smaller ones, every time the page is loaded and not do it once and load those images? After all, it is an e-commerce site. You know that it will have lots of images :P

Well I think that's the reason..
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.