Jump to content

[Resolved] Image files - lots of duplicates created, can I restrict them to what I need?


BooJewels

Recommended Posts

My new CC6 store is now up and running, thanks to Al for his considerable help moving it over for me.    https://www.boo-creations.co.uk/shop/

It's not a deal-breaker, but I wonder if there is a better way to do things to save data capacity, in respect of my image files - I'm ending up with a lot too many of them - that is, several versions of the same image.  I presume these are to allow for different skin and image handling arrangements?  I'm using an edited version of e-Tone and MagicThumb plug in for my image display as I didn't like how they worked in the skin (don't entirely like MagicThumb either), my smaller images are I think the limiting factor.  I tried a couple of items with larger images, but prefer to stay smaller as my items are small.

I create my own 'as seen on the page' image files that are almost always 392px wide, with varying height (i.e 390 + 1px border all round) - this was a habit I formed with my old CC3 store as in the early days, this was more than sufficiently large as screens were much lower res than now.  I supplemented this by uploading my own 90px wide thumbnails and found a hack somewhere to stop CC3 generating its own thumbs and over-writing mine each time I edited a page.

As I've moved to a CC6 store, Al imported all of my images, which is something like 4500+ of them and the same amount of associated thumbs (although they're not used on this version).  I've added a few new items to this shop and updated a few images and ftp'd them to the images/source directory, then 'updated the file list' - this works and images are where I expect and correctly appear in listings etc.   The thumbs used by MagicThumb resolutely remain at 40px wide, no matter what size I specify in the settings.

When I look at the cache directory, which is where the in use images are, there are now 5 versions of each image, as per the list below

Original file uploaded:

https://www.boo-creations.co.uk/shop/images/source/Volume_18/earrings30820f.jpg

Copies/different sizes:

https://www.boo-creations.co.uk/shop/images/cache/Volume_18/earrings30820f.600.jpg
https://www.boo-creations.co.uk/shop/images/cache/Volume_18/earrings30820f.392.jpg
https://www.boo-creations.co.uk/shop/images/cache/Volume_18/earrings30820f.120.jpg
https://www.boo-creations.co.uk/shop/images/cache/Volume_18/earrings30820f.40.jpg
https://www.boo-creations.co.uk/shop/images/cache/Volume_18/earrings30820f.jpg

I've manually over-written the 40 and 120 px versions as I prefer my own thumbs as these are both used, but there's a copy of the original, a 392 version (which seems to be the one actually displayed, but looks the same as the original) and the 600 version is visually the same and not actually used - or actually re-sized.  The original file was 46Kb and the additional ones are something like 215Kb - significantly more and with the amount of images I have, it's about 1Gb of additional files - some are duplicates or not even used.

Can I upload images directly to the cache directory, or does it need to be in source to allow a file table (or whatever the correct term is) to be built?  Can I delete them from source later, once they're in cache (and delete unwanted versions, like the 600 one), or can I prevent it from making so many copies that aren't needed in the first place?

Link to comment
Share on other sites

Hi Julia,

The images/cache directory gets purged regularly so any changes you may are likely to get overwritten. The cache folder merely contains size variants of the master image. 

The sizes are specified in the skins/{skin in use}/config.xml file. 

CubeCart doesn't have any built in functionality to allow you to specify a different thumbnail. 

I hope this makes sense. 

Link to comment
Share on other sites

9 minutes ago, Al Brookbanks said:

The images/cache directory gets purged regularly so any changes you may are likely to get overwritten

Good afternoon Al - thank you.  That's a bugger as the images produced are a bit dark and soft compared to mine and I would prefer to retain the ones I create.

I've opened the config.xml file.  I can at least see why some of the small ones are horrible, it has quality at 60 and 80. 

Can I edit that file to what I'd choose?  Eg. take out the 600px version and improve the quality?  Will that mess up existing images, or only affect any new files added?

Link to comment
Share on other sites

I've updated the config file and changed the 'tiny' file to 60px and already, all my thumbs are that bit bigger, which was what I wanted.  It clearly trumps whatever settings MagicThumb is given and it's no wonder I couldn't get them any larger within that - I'd even re-installed it to start over and it didn't change anything.  I've deleted the larger image specs, so hopefully that at least will stop any future unused 600px files being created, cutting down on server space.

Many thanks.  I'd left it alone for a while as I was getting fed up with it all, but as soon as you think you're getting settled, something else crops up.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...