[Skip to main content](#vessel-content)

#   How to set proportions of product images?

##

- **[selma123](/forum/user/4926-selma123 "View selma123's Profile")**
- [![selma123's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4926-selma123 "View selma123's Profile") Topic Author
- [ Offline](/forum/user/4926-selma123)

Less More

- Posts: 11
- Thank you received: 0
-
-

10 years 6 months ago [\#238402](#238402) by [selma123](/forum/user/4926-selma123 "View selma123's Profile")  *[How to set proportions of product images?](/forum/26-product-category-display/884185-how-to-set-proportions-of-product-images#238402 "-- url of the page with the problem -- :   web1217.login-4.loginserver.ch/shop.html  -- HikaShop version -- : 2.6.2 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.5 -- Browser(s) name and version -- : Chrome  All images are shown as square, but I need to show them in the right proportions, e.g. 20x10cm (original image size), because the shop sells art images and the buyer need to see the correct sizes on the first sight. Same when clicking on product, there also the right proportions of the image must be shown. Only when clicking again for the 3rd time, then I see the correct size, but this is very user unfriendly. How can I handle that? is this possible? thank you in advance for your suppprt.")* was created by *[selma123](/forum/user/4926-selma123 "View selma123's Profile")*

-- url of the page with the problem -- : [ web1217.login-4.loginserver.ch/shop.html](http://web1217.login-4.loginserver.ch/shop.html)
-- HikaShop version -- : 2.6.2
-- Joomla version -- : 3.5.1
-- PHP version -- : 5.5
-- Browser(s) name and version -- : Chrome

All images are shown as square, but I need to show them in the right proportions, e.g. 20x10cm (original image size), because the shop sells art images and the buyer need to see the correct sizes on the first sight. Same when clicking on product, there also the right proportions of the image must be shown. Only when clicking again for the 3rd time, then I see the correct size, but this is very user unfriendly. How can I handle that? is this possible? thank you in advance for your suppprt.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODQxODUtaG93LXRvLXNldC1wcm9wb3J0aW9ucy1vZi1wcm9kdWN0LWltYWdlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

10 years 6 months ago [\#238439](#238439) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to set proportions of product images?](/forum/26-product-category-display/884185-how-to-set-proportions-of-product-images#238439 "-- url of the page with the problem -- :   web1217.login-4.loginserver.ch/shop.html  -- HikaShop version -- : 2.6.2 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.5 -- Browser(s) name and version -- : Chrome  All images are shown as square, but I need to show them in the right proportions, e.g. 20x10cm (original image size), because the shop sells art images and the buyer need to see the correct sizes on the first sight. Same when clicking on product, there also the right proportions of the image must be shown. Only when clicking again for the 3rd time, then I see the correct size, but this is very user unfriendly. How can I handle that? is this possible? thank you in advance for your suppprt.")*

Hi,

It depends on how you configured the "Force images size" and the "Image scale mode" settings of the HikaShop configuration. So please try the different values so that it looks like you want.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODQxODUtaG93LXRvLXNldC1wcm9wb3J0aW9ucy1vZi1wcm9kdWN0LWltYWdlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[selma123](/forum/user/4926-selma123 "View selma123's Profile")**
- [![selma123's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4926-selma123 "View selma123's Profile") Topic Author
- [ Offline](/forum/user/4926-selma123)

Less More

- Posts: 11
- Thank you received: 0
-
-

10 years 6 months ago [\#238978](#238978) by [selma123](/forum/user/4926-selma123 "View selma123's Profile")  Replied by *[selma123](/forum/user/4926-selma123 "View selma123's Profile")* on topic *[How to set proportions of product images?](/forum/26-product-category-display/884185-how-to-set-proportions-of-product-images#238978 "-- url of the page with the problem -- :   web1217.login-4.loginserver.ch/shop.html  -- HikaShop version -- : 2.6.2 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.5 -- Browser(s) name and version -- : Chrome  All images are shown as square, but I need to show them in the right proportions, e.g. 20x10cm (original image size), because the shop sells art images and the buyer need to see the correct sizes on the first sight. Same when clicking on product, there also the right proportions of the image must be shown. Only when clicking again for the 3rd time, then I see the correct size, but this is very user unfriendly. How can I handle that? is this possible? thank you in advance for your suppprt.")*

Ni Nicolas, excellent, thank you, the size of the images is now with the correct ratio. The only thing is that the images now have a white background, which I want to change to black, but I just couldn't figure out where to change this setting. When I change the backgroundcolor of the Item Box configuration, it still remains white. thank you in advance for your appreciated support.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODQxODUtaG93LXRvLXNldC1wcm9wb3J0aW9ucy1vZi1wcm9kdWN0LWltYWdlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 652
-
-

10 years 6 months ago -  10 years 6 months ago [\#238985](#238985) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[How to set proportions of product images?](/forum/26-product-category-display/884185-how-to-set-proportions-of-product-images#238985 "-- url of the page with the problem -- :   web1217.login-4.loginserver.ch/shop.html  -- HikaShop version -- : 2.6.2 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.5 -- Browser(s) name and version -- : Chrome  All images are shown as square, but I need to show them in the right proportions, e.g. 20x10cm (original image size), because the shop sells art images and the buyer need to see the correct sizes on the first sight. Same when clicking on product, there also the right proportions of the image must be shown. Only when clicking again for the 3rd time, then I see the correct size, but this is very user unfriendly. How can I handle that? is this possible? thank you in advance for your suppprt.")*

Hello,

The margin white you can see come from image **itself**, see :

[ ![picture.jpg](/forum/attachment/31186) ](/forum/attachment/31186 "picture.jpg")

I put your image on a black background with photoshop.

Regards.

- [ ![picture.jpg](/forum/attachment/31186) ](/forum/attachment/31186 "picture.jpg") [ ](/forum/attachment/31186?download=1 "picture.jpg")

Last edit: 10 years 6 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODQxODUtaG93LXRvLXNldC1wcm9wb3J0aW9ucy1vZi1wcm9kdWN0LWltYWdlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[selma123](/forum/user/4926-selma123 "View selma123's Profile")**
- [![selma123's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4926-selma123 "View selma123's Profile") Topic Author
- [ Offline](/forum/user/4926-selma123)

Less More

- Posts: 11
- Thank you received: 0
-
-

10 years 6 months ago [\#239089](#239089) by [selma123](/forum/user/4926-selma123 "View selma123's Profile")  Replied by *[selma123](/forum/user/4926-selma123 "View selma123's Profile")* on topic *[How to set proportions of product images?](/forum/26-product-category-display/884185-how-to-set-proportions-of-product-images#239089 "-- url of the page with the problem -- :   web1217.login-4.loginserver.ch/shop.html  -- HikaShop version -- : 2.6.2 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.5 -- Browser(s) name and version -- : Chrome  All images are shown as square, but I need to show them in the right proportions, e.g. 20x10cm (original image size), because the shop sells art images and the buyer need to see the correct sizes on the first sight. Same when clicking on product, there also the right proportions of the image must be shown. Only when clicking again for the 3rd time, then I see the correct size, but this is very user unfriendly. How can I handle that? is this possible? thank you in advance for your suppprt.")*

Hi Philip, this is impossible, all images are croped without any border. See this wide image: [ web1217.login-4.loginserver.ch/produktde...0-sivler-flower.html](http://web1217.login-4.loginserver.ch/produktdetail/product/780-sivler-flower.html). when you click on the image, you can see that it opens without the white background as shot on the product detail. therefore there must be a setting to change that background? thank you again for your support.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODQxODUtaG93LXRvLXNldC1wcm9wb3J0aW9ucy1vZi1wcm9kdWN0LWltYWdlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

10 years 6 months ago [\#239127](#239127) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to set proportions of product images?](/forum/26-product-category-display/884185-how-to-set-proportions-of-product-images#239127 "-- url of the page with the problem -- :   web1217.login-4.loginserver.ch/shop.html  -- HikaShop version -- : 2.6.2 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.5 -- Browser(s) name and version -- : Chrome  All images are shown as square, but I need to show them in the right proportions, e.g. 20x10cm (original image size), because the shop sells art images and the buyer need to see the correct sizes on the first sight. Same when clicking on product, there also the right proportions of the image must be shown. Only when clicking again for the 3rd time, then I see the correct size, but this is very user unfriendly. How can I handle that? is this possible? thank you in advance for your suppprt.")*

Hi,

There is no setting to change the color of the background.
You would have to change the code: Code:

$image_options = array('default' =&gt; true,'forcesize'=&gt;$this-&gt;config-&gt;get('image_force_size',true),'scale'=&gt;$this-&gt;config-&gt;get('image_scale_mode','inside'));

like that: Code:

$image_options = array('default' =&gt; true,'forcesize'=&gt;$this-&gt;config-&gt;get('image_force_size',true),'scale'=&gt;$this-&gt;config-&gt;get('image_scale_mode','inside'), 'background'=&gt;'#000000');

in the file listing_img_title of the view product via the menu Display&gt;Views.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODQxODUtaG93LXRvLXNldC1wcm9wb3J0aW9ucy1vZi1wcm9kdWN0LWltYWdlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[selma123](/forum/user/4926-selma123 "View selma123's Profile")**
- [![selma123's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4926-selma123 "View selma123's Profile") Topic Author
- [ Offline](/forum/user/4926-selma123)

Less More

- Posts: 11
- Thank you received: 0
-
-

10 years 6 months ago [\#239215](#239215) by [selma123](/forum/user/4926-selma123 "View selma123's Profile")  Replied by *[selma123](/forum/user/4926-selma123 "View selma123's Profile")* on topic *[How to set proportions of product images?](/forum/26-product-category-display/884185-how-to-set-proportions-of-product-images#239215 "-- url of the page with the problem -- :   web1217.login-4.loginserver.ch/shop.html  -- HikaShop version -- : 2.6.2 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.5 -- Browser(s) name and version -- : Chrome  All images are shown as square, but I need to show them in the right proportions, e.g. 20x10cm (original image size), because the shop sells art images and the buyer need to see the correct sizes on the first sight. Same when clicking on product, there also the right proportions of the image must be shown. Only when clicking again for the 3rd time, then I see the correct size, but this is very user unfriendly. How can I handle that? is this possible? thank you in advance for your suppprt.")*

Hi Nicolas,

Thank you for the hint, I changed the code exactly as described, but the background of the image remains still white ![:-/](/irritated.gif ":-/") Any other hint? I suppose that also other user have dark templates and the White background irritates the design.

Thank you in advance for your support.

best regards

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODQxODUtaG93LXRvLXNldC1wcm9wb3J0aW9ucy1vZi1wcm9kdWN0LWltYWdlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

10 years 6 months ago [\#239224](#239224) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to set proportions of product images?](/forum/26-product-category-display/884185-how-to-set-proportions-of-product-images#239224 "-- url of the page with the problem -- :   web1217.login-4.loginserver.ch/shop.html  -- HikaShop version -- : 2.6.2 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.5 -- Browser(s) name and version -- : Chrome  All images are shown as square, but I need to show them in the right proportions, e.g. 20x10cm (original image size), because the shop sells art images and the buyer need to see the correct sizes on the first sight. Same when clicking on product, there also the right proportions of the image must be shown. Only when clicking again for the 3rd time, then I see the correct size, but this is very user unfriendly. How can I handle that? is this possible? thank you in advance for your suppprt.")*

Hi,

Note that the change will only do something when generating new thumbnails. Once the thumbnails are generated, HikaShop won't regenerate them.
So you want to delete the folders images/com_hikashop/upload/thumbnails so that HikaShop will then regenerate the thumbnails with the background color taken into account.
And make sure that you're editing the view file for the template you're using on your frontend and not another template or you won't see the change taken into account.

Also, if you turn off the "Force images size" setting or change the "Image scale mode" setting to crop or use images with the same ratio or use a white background, you wouldn't get the problem with the white stripes around the thumbnails either. That's why most people don't have the problem as it is apparent only in a very specific case.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODQxODUtaG93LXRvLXNldC1wcm9wb3J0aW9ucy1vZi1wcm9kdWN0LWltYWdlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[selma123](/forum/user/4926-selma123 "View selma123's Profile")**
- [![selma123's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4926-selma123 "View selma123's Profile") Topic Author
- [ Offline](/forum/user/4926-selma123)

Less More

- Posts: 11
- Thank you received: 0
-
-

10 years 6 months ago [\#239402](#239402) by [selma123](/forum/user/4926-selma123 "View selma123's Profile")  Replied by *[selma123](/forum/user/4926-selma123 "View selma123's Profile")* on topic *[How to set proportions of product images?](/forum/26-product-category-display/884185-how-to-set-proportions-of-product-images#239402 "-- url of the page with the problem -- :   web1217.login-4.loginserver.ch/shop.html  -- HikaShop version -- : 2.6.2 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.5 -- Browser(s) name and version -- : Chrome  All images are shown as square, but I need to show them in the right proportions, e.g. 20x10cm (original image size), because the shop sells art images and the buyer need to see the correct sizes on the first sight. Same when clicking on product, there also the right proportions of the image must be shown. Only when clicking again for the 3rd time, then I see the correct size, but this is very user unfriendly. How can I handle that? is this possible? thank you in advance for your suppprt.")*

Hi Nicolas, Excellent, the setting force image size=no and Image scale mode=keep ratio did the trick and the white background is gone ![:-)](/media/kunena/emoticons/3.png ":-)")) thank you so much for your support.
best regards

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODQxODUtaG93LXRvLXNldC1wcm9wb3J0aW9ucy1vZi1wcm9kdWN0LWltYWdlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.065 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
