Jump to content

SubCategories - Image Thumbnail + Main Image


Tiago

Recommended Posts

Hi!

I have a subcategory image with dimensions of 870x194px, to appear at the top when I enter a subcategory: 
http://prntscr.com/kzu143

When I insert this image, it automatically creates the category thumbnail by resizing the image from 870x194px to 125x125px. But I do not want it to be added automatically, and I end up selecting the image I want with 125x125px, for the category thumbnail, as it is in this example: http://prntscr.com/kzu2pm

The issue is that in FrontEnd, when I go to categories, the thumbnail image that is loaded is the "medium_default" (which has the 870x194px resized image) and not the "Thumb" (correct image with 125x125px).

How can I set to call the image "thumb" and not the "medium_default" image?

I have already tried to change the category.tpl file, putting:

<div class="subcategory-image">
                        <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}" title="{$subcategory.name|escape:'html':'UTF-8'}" class="img">
                            {if $subcategory.id_image}
                                <img class="replace-2x" src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, '_thumb')|escape:'html':'UTF-8'}" alt="{$subcategory.name|escape:'html':'UTF-8'}" />
                            {else}
                                <img class="replace-2x" src="{$img_cat_dir}{$lang_iso}-default-medium_default.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />
                            {/if}
                        </a>
                       </div>

 

But the link that returns to loading the categories is: https://site.pt/c/563-_thumb/xpto.jpg - and should be: https://site.pt/img/c/563_thumb.jpg

 

Can someone help me solve this situation?

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...