Jump to content

[HELP] Category Image Size Resizes automatically?


Recommended Posts

Hi

 

I am trying to set a category banner with the sizes 735x200

 

On BO -Images - Category_default i have a size of 735x200 but on front office it resizes to 500 * 136

 

When inspected it states "500x136 pixels (Natural: 735x200)"

 

I've tried to regenerate, with no sucess.

 

What am i missing?

 

 

Link to comment
Share on other sites

you have to change template file to support new width

you can do it manually.

in some cases it is also related to cache, so please make sure that you cleared shop cache, just recompile your entire theme

 

Should be on category.tpl, within my theme right? or am i looking in the wrong place?

Edited by nspinheiro (see edit history)
Link to comment
Share on other sites

yes, category.tpl

there is a code like

<img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html'}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" />

change this part of code above:

width="{$categorySize.width}" height="{$categorySize.height}"

just remove it or use own width and height in pixels (instead of {$categorySize} variable.

  • Like 1
Link to comment
Share on other sites

yes, category.tpl

there is a code like

<img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html'}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" />

change this part of code above:

width="{$categorySize.width}" height="{$categorySize.height}"

just remove it or use own width and height in pixels (instead of {$categorySize} variable.

 

 

Perfect!!! THanks

Link to comment
Share on other sites

  • 1 year later...

Struggling with this issue also on PS 1.6.1.2

 

When I edit the category.tpl code like this:

<div class="content_scene_cat_bg"{if $category->id_image} style="background:url({$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}) right center no-repeat; background-size:cover; max-height:270px;"{/if}>

I got this code in the FO:

.....no-repeat scroll right center / cover ; max-height: 270px; min-height: 870px;">

Where the heck came the 870px from?

I resized my category images to 270x270px, clered the cach.

 

What can i do?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...