darknumbers
darknumbers

Reputation: 33

Magento - Constant product size for image and configurable swatches

I am a newbie in using Magento. Currently, I am trying to set a constant product image grid (500px x 500 px) for the product detail page. Some of my products images are taken in square and rectangular shapes so I need to resize them to fit into the grid as well. Here is one of my product detail page:

http://www.kukubird.co.uk/kukubird-new-girls-ladies-large-dachshund-cartoon-designs-purse-wallet.html

I tried to set the grid height on css file but got no luck to achieve the result I want (Seems that Magento keeps updating the css files frequently).

Any advices or guidance would be much appreciated. Thank you very much!


UPDATE 02: It seems that I finally set the image grid to be constant by adjusting a css file:

.img-box-style1 .product-image {
	border:1px solid #eee;
	padding:5px;
	height: 500px;
}

However, I could not manage to resize the product image after clicking a colour swatch. Any advices or guidance for this?


UPDATE 02: Thanks partypete25 for the reply. We have tried to resize the image using CSS but it seems that we need more than that. Currently, the Magento takes the swatch thumbnail image and resize it on the product grid image. This caused a low quality image gallery. So perhaps we need to amend the template file/php to achieve what we want. Any guidance?


UPDATE 03: Hi all, this is just to update that our problem has been resolved. We have integrated a simple plug-in to achieve what we need. Thanks everyone for giving out their precious opinions.

Upvotes: 0

Views: 900

Answers (1)

partypete25
partypete25

Reputation: 4413

Is this for the images that are appearing smaller (narrower) than the product image grid?

Try adding this to your css:

.product-image-gallery .gallery-image {
  min-width: 100%;
}

Note: this will affect the appearance of image quality depending on how much it is being enlarged.

Upvotes: 0

Related Questions