Replacing All Photos Of The Site

Hello!

We need to replace all our images on the site after discovering that hidpi addon mess with them and we need a little help...

1. we are thinking to delete the old images (/images/detailed/) thru ftp, upload new images with the same name in the same directory and then use regenerate thumbnails function from backend? Is it ok?

2. Is it ok to delete some directories in /images/detailed/ that contains photos that are not in use (like photos of the demo data) to gain some space on the server? for example /images/detailed/1 ?

3. we are using the watermark addon.... if we replace all photos, the watermark will autoamatic regenarate all the watermark photos or we need to do something?

Thanks a lot,

Stefan

Hello!

We need to replace all our images on the site after discovering that hidpi addon mess with them and we need a little help...

1. we are thinking to delete the old images (/images/detailed/) thru ftp, upload new images with the same name in the same directory and then use regenerate thumbnails function from backend? Is it ok?

Yes, you can remove image files and upload new image files with same names and clear thumbnail cache. Thumbnails will be generated from new image files.

2. Is it ok to delete some directories in /images/detailed/ that contains photos that are not in use (like photos of the demo data) to gain some space on the server? for example /images/detailed/1 ?

Yes, it is OK. But please make sure that these directories do not contain images of your products.

3. we are using the watermark addon.... if we replace all photos, the watermark will autoamatic regenarate all the watermark photos or we need to do something?

Product and category watermarks will be regenerated after you clear the thumbnail cache.

Thanks a lot for the quick and complete answer!

I have one more question (mostly out of curiosity): what is the logic for /1,/2,/3... images directories? Why aren't all the images in a single directory?

Thanks,

Stefan

Thanks a lot for the quick and complete answer!

I have one more question (mostly out of curiosity): what is the logic for /1,/2,/3... images directories? Why aren't all the images in a single directory?

Thanks,

Stefan

It's easier on the server to search through a thousand files rather than a million files in a directory.

Ok, that makes sense. But how are those directory created? I mean when is a new one created? When the last one reaches a quota limit or a file number limit? Somethin like that?

/config.local.php

// Maximum number of files, stored in directory. You may change this parameter straight after a store was installed. And you must not change it when the store has been populated with products already.
define('MAX_FILES_IN_DIR', 1000);

/config.local.php

// Maximum number of files, stored in directory. You may change this parameter straight after a store was installed. And you must not change it when the store has been populated with products already.
define('MAX_FILES_IN_DIR', 1000);

Ok, i saw this.

But, for example in my case, in the image/detailed/ directory there are 3 subdirectories: /0 (632 files), /1 (1463 files), /2 (23 files). And in config.local.php that value is 1000.

So it seems to me that it's not this...

I think maybe it is somehow time related, because in /0 we have images of the cs-cart demo files, in /1 we have images of our product wich were uploaded in like a week a couple of month ago, and in /2 we have images of some products uploaded a couple of days ago.

Would this then generate all the 2x images as well if HiDPI was enabled?