I need to optimize a cs-cart webpage for PageSpeed. I’ve got 2 problems:
- I’ve got a block: Articles, which serves 3 latest articles’ thumbnails and brief message. When 2 or more articles have the same thumbnail picture, the thumbnail pictures are served from several different urls, like:
I don’t know why there are several subdirectories in the thumbnails/ directory. Instead of 3 different urls for the same thumbnail, I’d like to have only 1. How can I do this?
- Google PageSpeed tells me, that thumbnail images for my products can be more optimized. How can I make thumbnails to be generated in optimized way?
In regard to point 2 - try Smush it - http://www.smushit.com/ysmush.it/ will compress images without quality loss.
And in regards to point one, put simply, you can't without major changes to the core.
This would involve removing the functionality for deleting the image when a page/category/product/product variant/product option, etc, is deleted from the cart as well as major changes to how image paths are generated.
As default, when you delete a product, the image assigned to the product is also deleted…the expense of having a solution developed for this issue would far outweigh expenses you could put into other areas for decreasing page load times and server load.
Thank you for the link. I will try to use it with generate_thumbnail_post hook.
Thank you for your expert answer.