Jump to content

[SOLVED] Forcing Prestashop To NOT Resize Images


Guest

Recommended Posts

Hey guys,

 

So I want my products to fill the div of the product image container. I want to use jQuery to fill it based on if height > width, fill 100% width and vice versa. This is all fine and dandy to do with jQuery, but the problem lies in the fact that Prestashop automatically resizes my images to the exact container of the product image, leaving white space.

 

Is there anyway to force Prestashop to keep the native size?

 

Thanks in advance,

 

eggo

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

Hey Nemo, thanks for the suggestion but I actually think I need to think of a better solution with bootstrap being part of the theme and the resizing issue. Vekia you were right, by removing 'home-default' from the img src the original image was displayed.

 

I think the next best option for my situation would be if possible to specify which image from the reel is shown on product-list.tpl and which is shown on product.tpl based on id=1 or id=2.

 

Is there anyway to select which item from the image number uploaded using this?

 

<img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')}"

 

Thanks in advance Vekia and Nemo :)

 

EDIT: Realized this is possible via default images and default combinations. My bad! I'll mark this is as solved for now. :)

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

  • 5 years later...

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