Jump to content

[SOLVED] how to resize home feature product image


Recommended Posts

hi duniamodem,

you have to change "modules/homefeatured/homefeatured.tpl" at ligne 16, by changing 'home' by 'medium' after "$product.id_image,"

before

getImageLink($product.link_rewrite, $product.id_image, 'home')}" height="{$homeSize.height}" width="{$homeSize.width}" alt="{$product.legend|escape:htmlall:'UTF-8'}" />



after

getImageLink($product.link_rewrite, $product.id_image, 'medium')}" height="{$homeSize.height}" width="{$homeSize.width}" alt="{$product.legend|escape:htmlall:'UTF-8'}" />



the image will take by default 80px/80px, you can also replace the height and width by numerical value.

before

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



after

height="80" width="80"



GL

Link to comment
Share on other sites

hi duniamodem,

you have to change "modules/homefeatured/homefeatured.tpl" at ligne 16, by changing 'home' by 'medium' after "$product.id_image,"

before
getImageLink($product.link_rewrite, $product.id_image, 'home')}" height="{$homeSize.height}" width="{$homeSize.width}" alt="{$product.legend|escape:htmlall:'UTF-8'}" />



after

getImageLink($product.link_rewrite, $product.id_image, 'medium')}" height="{$homeSize.height}" width="{$homeSize.width}" alt="{$product.legend|escape:htmlall:'UTF-8'}" />



the image will take by default 80px/80px, you can also replace the height and width by numerical value.

before

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



after

height="80" width="80"



GL


OK thanxs bro..
i'll try now.. ..


edited.. SOLVED bro.. thx .. :shakehand:
Link to comment
Share on other sites

  • 1 year later...


after
getImageLink($product.link_rewrite, $product.id_image, 'medium')}" height="{$homeSize.height}" width="{$homeSize.width}" alt="{$product.legend|escape:htmlall:'UTF-8'}" />



the image will take by default 80px/80px, you can also replace the height and width by numerical value.

before

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



after

height="80" width="80"



GL




Sorry for the bump, but is it also possible to get the height/width of the .jpg image automatically? For example, my 1-810-home-jpg file has dimension of: 120(w)x150(h). Some other pictures have for example 150(w)x120(h).

If I let the code take the dimensions of 'home', then it is static and dependent of the dimensions defined in BO.
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...