Image Size

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 anni tempo fa
Hello,

Is it possible to increase the size of product thumbnail on the homepage.

Regards,
13 anni tempo fa
Seems that the size is hardcoded to 125px so you will need to change it in the file:
HomePageProducts.ascx.cs which is found in the modules folder.

Really easy to make it configurable instead by replacing 125 with a value that is read from settings so then it would be possible to change it from admin.

Perhaps something the devteam could consider for next version of nopCommerce.

BR
Joakim
13 anni tempo fa
lubish wrote:
Hello,

Is it possible to increase the size of product thumbnail on the homepage.

Regards,

You can change the size of the thumbnails for featured products on the home page by changing the value in: Administration > Configuration > Global Settings > Media (tab) > "Product thumbnail image size:". This will affect the size of product thumbnails on other pages as well (new products, category templates, search results, etc.) If you increase the size by too much, you may need to adjust the CSS to accommodate for larger images.

.
13 anni tempo fa
jockesoft wrote:
Seems that the size is hardcoded to 125px so you will need to change it in the file:
HomePageProducts.ascx.cs which is found in the modules folder.

Really easy to make it configurable instead by replacing 125 with a value that is read from settings so then it would be possible to change it from admin.

Perhaps something the devteam could consider for next version of nopCommerce.

BR
Joakim

With regards to 125 being hard-coded; if you are referring to the following lines in Modules\HomePageProducts.ascx.cs:
if (picture != null)
    hlImageLink.ImageUrl = PictureManager.GetPictureUrl(picture, SettingManager.GetSettingValueInteger("Media.Product.ThumbnailImageSize", 125), true);
else
    hlImageLink.ImageUrl = PictureManager.GetDefaultPictureUrl(SettingManager.GetSettingValueInteger("Media.Product.ThumbnailImageSize", 125));

the 125 is a default value to use in case the setting "Media.Product.ThumbnailImageSize" can't be loaded.

.
13 anni tempo fa
Opps, was too fast in my reply there it seems, thanks for settings me straight :)
13 anni tempo fa
Very Nice, Thanks Guys
13 anni tempo fa
Is there a way to hard code the image size?

I wish to have the category images on the home page larger then the sub-category images on the sub pages. I have a few main categories and many sub-categories.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.