Kalarah Posted January 27, 2017 Share Posted January 27, 2017 I have now inputted 100 products in my CC. There is now an issue. When uploading an image and using it for the product, CC creates 9 additional images. Why? This is simply too many. I know they are all of different sizes, and I think they are being used for specific screen widths for @media in the CSS. Anyone whows knows responsive design knows to use box-sizing like so: *, *:after, *:before { margin: 0; padding: 0; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box } And also: img { -ms-interpolation-mode: bicubic; border-style: none; vertical-align: top; max-width: 100%; height: auto; } So I'm asking, how do we stop CC from creating so many useless images? And also, another annoying thing. If you delete a product, it does not delete the images with it so we are left with a trove of images not being used and taking up space. Quote Link to comment Share on other sites More sharing options...
Noodleman Posted January 27, 2017 Share Posted January 27, 2017 because that is what your store skin is configured to use in it's config file. CC will build cached versions of all sizes your skin needs so it doesn't have to build / process images on the fly, which is a very memory and CPU intensive process. Doing it once and caching the result is effecient. They are not useless, they are required. If you don't want them, remove them from your skin config file. I will be releasing a module to clean up unused images, should be out in a couple of months. Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 27, 2017 Share Posted January 27, 2017 CubeCart is following the dictates of the skin. In the named skin folder, a config.xml file states the various sizes of the images it has required in its design. The various sizes are keyed to reference words and CubeCart uses the reference words to create a URL for the page resource. You have a valid point: have just one 800x600 image and let the browser use it everywhere, having the browser scale to fit CSS or HTML size declarations. If you wish to experiment, in the skin's config.xml file, change all the reference image sizes to have the same maximum=800 (and be sure to upload at least that size image). Then, CubeCart will only make one rendered image. In past stores (CC3 which has a different process), I had the need to create a distinctly unique smaller version of the main image - that is, not being a simple resizing to a smaller version of the same image. Therefore, for others having a similar requirement, 'pre-loading' the image cache with an externally derived set of main images coincides with the skin's references. The product to image relationship is a "many to many". While much of the time, one image depicts one product, that is not always the case. One can assign the same image to many different products, and also assign many images (one image is the main image, the rest appear in a gallery) to one product. Given that capability, deleting images must be a manual effort. Quote Link to comment Share on other sites More sharing options...
Noodleman Posted January 27, 2017 Share Posted January 27, 2017 from a performance perspective, not having to scale images and being able load smaller file sizes will make page load times faster. Sometime this year google will be factoring in page load times into search result rankings, so it's worth consider now. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.