2

In these months I'm working on a Magento CMS for the first time (version 1.9.2.1). I came across a problem due to image bulk rename. The thing that was asked to me is to optimize image file for a good SEO.

I see that images are stored in 3 ways:

  • in DB
  • in /media/catalog/product folder
  • in /media/catalog/product/cache folder

I've found a great extension for work with the cached images (https://github.com/Vinai/nicer-image-names). I've integrated it making a little mod for work with all labels (instead to work only if labels are empties). and it works as expects.

But the problem remains, the owner of the site asked me if is possible to rename the base filename instead of the cached images, and... well.. seems various people have this idea but no one try to work on this way (at least sharing that for free). Furthermore, the site uses a watermark added by Magento for the images which are produced by ourselves.

After all these premises my questions are:

  • What is the best usage solution for Magento images?
  • Is it better use the /media/catalog/product folder or the cached images in /media/catalog/product/cache/ ? (nearly sure is better to use cache and hide /media/catalog/product from robots.txt due to watermark, but is better to ask...)
  • What is the purpose of having them also in the DB?
  • What is the purpose of having them sorted by first char / second char in /media/catalog/product/first-char/second-char ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.