I am getting Specify image dimensions Errors

Hi,
 
I am getting Specify image dimensions Error on my site when i scan it on gtmatrix.com as followed.
The following image(s) are missing width and/or height attributes.

How can I solve this issue.
Regards,

5 answers

Profile photo of Mall Staff 184060.00 $tone May 26, 2016
Public

Hi Chaitanya Badhe,
Yes, we have not check our theme with `gtmetrix` yet.
To solve that issues, let’s open the template files at path:
app/design/frontend/default/jm_sporty/template/joomlart/jmproductsslider/list.phtml
and do some steps as bellow:
Step 1: find to the code line:

<img class="jm-slide-left-img" title="Left direction" onmouseout="this.src='<?php echo $this->getSkinUrl('joomlart/jmproductsslider/images/re-left.png') ?>'" onmouseover="this.src='<?php echo $this->getSkinUrl('joomlart/jmproductsslider/images/re-left-hover.png') ?>'" alt="Left direction" src="<?php echo $this->getSkinUrl('joomlart/jmproductsslider/images/re-left.png') ?>"/>

and replace it by code line:

<img width="30px" height="30px" class="jm-slide-left-img" title="Left direction" onmouseout="this.src='<?php echo $this->getSkinUrl('joomlart/jmproductsslider/images/re-left.png') ?>'" onmouseover="this.src='<?php echo $this->getSkinUrl('joomlart/jmproductsslider/images/re-left-hover.png') ?>'" alt="Left direction" src="<?php echo $this->getSkinUrl('joomlart/jmproductsslider/images/re-left.png') ?>"/>

Step 2: find to the code line:

<img class="jm-slide-right-img" title="Right direction" onmouseout="this.src='<?php echo $this->getSkinUrl('joomlart/jmproductsslider/images/re-right.png') ?>'" onmouseover="this.src='<?php echo $this->getSkinUrl('joomlart/jmproductsslider/images/re-right-hover.png') ?>'" alt="Right direction" src="<?php echo $this->getSkinUrl('joomlart/jmproductsslider/images/re-right.png') ?>"/>

and replace it by code line:

<img width="30px" height="30px" class="jm-slide-right-img" title="Right direction" onmouseout="this.src='<?php echo $this->getSkinUrl('joomlart/jmproductsslider/images/re-right.png') ?>'" onmouseover="this.src='<?php echo $this->getSkinUrl('joomlart/jmproductsslider/images/re-right-hover.png') ?>'" alt="Right direction" src="<?php echo $this->getSkinUrl('joomlart/jmproductsslider/images/re-right.png') ?>"/>

Step 3: find to the code line:

<img src="<?php echo $this->helper('catalog/image')->init($_product, 'thumbnail')->keepAspectRatio(TRUE)->resize($configs['width'], $configs['height'])->setWatermarkSize('30x10'); ?>" alt="<?php echo $this->htmlEscape($_product->getName()) ?>"/>

and replace it by code line:

<img width="<?php echo $configs['width'] ?>" height="<?php echo $configs['height'] ?>" src="<?php echo $this->helper('catalog/image')->init($_product, 'thumbnail')->keepAspectRatio(TRUE)->resize($configs['width'], $configs['height'])->setWatermarkSize('30x10'); ?>" alt="<?php echo $this->htmlEscape($_product->getName()) ?>"/>

Step 4: open the template file at path:
app/design/frontend/default/jm_sporty/template/page/switch/languages.phtml
and find to the code line:

<img src="<?php echo $this->getSkinUrl('images/flags/' . $_lang->getCode() . '.png');?>" alt="<?php echo $_lang->getCode(); ?>" />

and replace it by code line:

<img width="16px" height="11px" src="<?php echo $this->getSkinUrl('images/flags/' . $_lang->getCode() . '.png');?>" alt="<?php echo $_lang->getCode(); ?>" />

and contact me if you need further assistance!
Regards,
Mall.
 
 

#3

Please login or Register to Submit Answer

Written By

Comments