According to gtmetrix.com, I need to specify image dimensions on /media/catalog/product/cache/1/thumbnail/300x300/......

I know what I need to do; in that I need to add 'width="300" height="300" but I can't find where I need to add this to? I tried app/design/frontend/THEME/template/catalog/product/view.phtml but no luck.

Any ideas?

1 Answer 1


The file which contains the images for the product view is in a separate file. You will find it in catalog/product/view/media.phtm. It sounds like your wanting to resize the gallery images? If so they are towards the bottom of the file.

You can use the resize function to resize to the desired size and then set the width and size of the img element using the syntax in your question.

Hope this helps.


  • Thanks! That doesn't see, to do it though. It looks like it's for a thumbnail, but the bit that confuses me is it mentions /cache ?
    – IVCatalina
    Nov 10, 2015 at 23:15
  • This is just where Magento stores a cached image to help with performance. What exactly are you trying to change? Which image in particular?
    – JoshCarter
    Nov 11, 2015 at 11:52
  • There's about 10 of them but they all start with the link above - /media/catalog/product/cache/1/thumbnail/300x300/......
    – IVCatalina
    Nov 12, 2015 at 2:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.