marcolipe Posted April 1, 2014 Share Posted April 1, 2014 (edited) Hi prestashop users can we please change the default image size off the subcategories preview images ? Example this square preview image of the subcategories is just ugly ;( http://mobile-repair.eu/en/14-iphone-repair Because like it is we get a 125 by 125x square with a small rectangule picture insside because the original image taken from the real categorie image is 870x by 217x so the preview should be 125x by 31x . not a 125x square Can someone please explain how to add a image size just four the subcategories images Thank you . Edited April 1, 2014 by marcolipe (see edit history) Link to comment Share on other sites More sharing options...
dioniz Posted April 1, 2014 Share Posted April 1, 2014 Hey Marcolipe You can do it like this: In yourtheme/category.tpl find this code: {if $subcategory.id_image} <img class="replace-2x" src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default')|escape:'html':'UTF-8'}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} <img class="replace-2x" src="{$img_cat_dir}default-medium_default.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {/if} change to this: {if $subcategory.id_image} <img class="replace-2x img-responsive" src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'category_default')|escape:'html':'UTF-8'}" alt="" width="{$categorySize.width}" height="{$categorySize.height}" /> {else} <img class="replace-2x img-responsive" src="{$img_cat_dir}default-category_default.jpg" alt="" width="{$categorySize.width}" height="{$categorySize.height}" /> {/if} 3 Link to comment Share on other sites More sharing options...
marcolipe Posted April 1, 2014 Author Share Posted April 1, 2014 Thank you so mutch its a lot better now thank you Link to comment Share on other sites More sharing options...
dioniz Posted April 1, 2014 Share Posted April 1, 2014 You are welcome 1 Link to comment Share on other sites More sharing options...
Goyo Posted November 23, 2014 Share Posted November 23, 2014 (edited) Thanks dioniz, your solution is running perfectly with 1.6.0.9 version Also, for better view, it's necessary to modify /themes/default-bootstrap/css/category.css in the line 50: replace the value of "height: 202px;" by "height: 125px;" for example. Edited November 23, 2014 by Goyo (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts