papagino Posted October 20, 2013 Share Posted October 20, 2013 Hi all, When running the GTmetrix to verify my site performance, I get the following on the report: The following image(s) are missing width and/or height attributes. http://www.miraxsupplements.com/modules/blockreinsurance/img/reinsurance-2-1.jpg (Dimensions: 66 x 52) http://www.miraxsupplements.com/modules/blockreinsurance/img/reinsurance-3-1.jpg (Dimensions: 66 x 52) http://www.miraxsupplements.com/modules/blockreinsurance/img/reinsurance-4-1.jpg (Dimensions: 66 x 52) http://www.miraxsupplements.com/modules/blockreinsurance/img/reinsurance-5-1.jpg (Dimensions: 66 x 52) ... Would there be a way to add the images dimensions for the blockreinsurance module in order to improve performance? Could this be done by modifying the code in the blockreinsurance.tpl file and/or by adding a new Image specification under Preferences > Images in the Back Office? Please advice how this could be done... Below are the content of the blockreinsurance.tpl that I assume would need to be modified: {* * 2007-2013 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2013 PrestaShop SA * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} {if $infos|@count > 0} <!-- MODULE Block reinsurance --> <div id="reinsurance_block" class="clearfix"> <ul class="width{$nbblocks}"> {foreach from=$infos item=info} <li><img src="{$module_dir}img/{$info.file_name}" alt="{$info.text|escape:html:'UTF-8'}" /> <span>{$info.text|escape:html:'UTF-8'}</span></li> {/foreach} </ul> </div> <!-- /MODULE Block reinsurance --> {/if} Thanks Dan Link to comment Share on other sites More sharing options...
vekia Posted October 21, 2013 Share Posted October 21, 2013 it will be much easier to add image height="" and width="" in blockreinsurance.tpl file <img src="{$module_dir}img/{$info.file_name}" width="66" height="52" alt="{$info.text|escape:html:'UTF-8'}" /> 2 Link to comment Share on other sites More sharing options...
papagino Posted October 21, 2013 Author Share Posted October 21, 2013 Thank you vekia, This fix worked as expected... Cheers Dan Link to comment Share on other sites More sharing options...
vekia Posted October 21, 2013 Share Posted October 21, 2013 you're welcome im going to mark this topic as [solved] with regards, Milos Link to comment Share on other sites More sharing options...
Recommended Posts