Product Image Sizes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 years ago
Hi all,

Is it possible to display different size images in the home page and in the category page?

I am showing few selected products on the home page with the image size smaller than the same products on their respective categories.

Could this be done? Via admin setting? Via code? How/where?

Many Thanks.
11 years ago
LAM-ECOM wrote:
Hi all,

Is it possible to display different size images in the home page and in the category page?

I am showing few selected products on the home page with the image size smaller than the same products on their respective categories.

Could this be done? Via admin setting? Via code? How/where?

Many Thanks.


I realized that the "cart" page shows the images on a different size than the home and category pages. I am coming from webforms and I still do not quite follow all MVC intrinsics. Where/How is the "cart" page pulling a different image size? Where does the image gets converted to the right size?

By the way, I am using V2.60

Thanks a lot.
11 years ago
I really need help with this!

How can I pull different size image for the products displayed on the home page? Different home/featured products, than the products on a category page.

Thanks a lot in advance.
11 years ago
in Nop.web/Views/catalog/_productsmallbox.cshtml they rendering the homepage product pictures. you can get the original size and show it which size you want.
11 years ago
elaa1979 wrote:
in Nop.web/Views/catalog/_productsmallbox.cshtml they rendering the homepage product pictures. you can get the original size and show it which size you want.


Do you mean this would get me the original image?

<img alt="@Model.DefaultPictureModel.AlternateText" src="@Model.DefaultPictureModel.FullSizeImageUrl" title="@Model.DefaultPictureModel.Title" />


Then what? How do I scale the image to the size I need? I hope you do not mean scaling the image via width/height in the HTML tag!

Please advise!

Thanks.
11 years ago
Anyone on this one?

Thanks.
11 years ago
in css you can add one more class like this.

.home-page-category-grid .category-item .picture img
{
  width:yourwidth;
  height: yourheight;
}


.home-page-product-grid .product-item .picture img
{
  width:yourwidth;
  height: yourheight;
}
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.