I analyzed my website on Gtmetrix.com for optimization and the result was this:

The following image(s) are missing width and/or height attributes:

(Dimensions: 168 x 168)
(Dimensions: 168 x 168)

Specify image dimensions

allows for faster rendering by eliminating the need for unnecessary reflows and repaints.Specifying a width and height for all images

how to solve it?

2 Answers 2


Look in your templates for <img> tags and where you find one that you are sure it has some fixed size, just add width=".." height=".." on it.

For sections where the product images are displayed (product list, view, related, upsells, crosssels, cart, wishlist) you should know the size because most of them have a resize.
In your case think there is something like ->resize(168) or ->resize(168, 168).
this means you have to add this to your img tag: width="168" height="168"


Any img tag use like this. its works grt just check out.

<img width="236" height="193" src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image') ?>"  alt="<?php echo $this->htmlEscape($_product->getName()) ?>" />

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.