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

#   Product page image wrong scalling

##

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

Less More

- Posts: 5
- Thank you received: 0
-
-

13 years 3 weeks ago [\#126599](#126599) by [kostalasa](/forum/user/25499-kostalasa "View kostalasa's Profile")  *[Product page image wrong scalling](/forum/26-product-category-display/862586-product-page-image-wrong-scalling#126599 "-- url of the page with the problem -- :   www.imgeater.com/blog/imgeater-download-...-windmills-free.html  -- HikaShop version -- : 2.2.2 -- Joomla version -- : 3.1.5 -- PHP version -- : 5.3.10 -- Browser(s) name and version -- : N/A -- Error-message(debug-mod must be tuned on) -- :N/A  Hello Nicholas,  I got one problem on the thumbnails generation for my main Product page images. I have configured HikaShop to generate Product Page Images with a Width of 266 and a Height of 200. It seems that somehow HikaShop swaps the two dimensions and whatever I do the generated images are assigned with Width = Configured Height = 200 in my example. The DIV is assigned the correct dimensions. Also the folder mentions wrong sizes (266x200).    www.imgeater.com/blog/media/com&#95;hikashop.../amorgos&#95;blue&#95;22.jpg  amorgos&#95;blue&#95;22.jpg = width 200 px instead of 266 px  Please note that normal thumbnails are created correctly:    www.imgeater.com/blog/media/com&#95;hikashop.../amorgos&#95;blue&#95;22.jpg  How can I fix this so that the generated product images are scaled correctly?")* was created by *[kostalasa](/forum/user/25499-kostalasa "View kostalasa's Profile")*

-- url of the page with the problem -- : [ www.imgeater.com/blog/imgeater-download-...-windmills-free.html](https://www.imgeater.com/blog/imgeater-download-photos-by-category/product/47-amorgos-panoramic-windmills-free.html)
-- HikaShop version -- : 2.2.2
-- Joomla version -- : 3.1.5
-- PHP version -- : 5.3.10
-- Browser(s) name and version -- : N/A
-- Error-message(debug-mod must be tuned on) -- :N/A

Hello Nicholas,

I got one problem on the thumbnails generation for my main **Product page images**. I have configured HikaShop to generate Product Page Images with a Width of 266 and a Height of 200. It seems that somehow HikaShop **swaps** the two dimensions and whatever I do the generated images are assigned with Width = Configured Height = 200 in my example. The DIV is assigned the correct dimensions. Also the folder mentions wrong sizes (266x200).

[ www.imgeater.com/blog/media/com\_hikashop.../amorgos\_blue\_22.jpg](https://www.imgeater.com/blog/media/com_hikashop/upload/thumbnails/266x200/amorgos_blue_22.jpg)

amorgos_blue_22.jpg = width 200 px instead of 266 px

Please note that normal thumbnails are created correctly:
[ www.imgeater.com/blog/media/com\_hikashop.../amorgos\_blue\_22.jpg](https://www.imgeater.com/blog/media/com_hikashop/upload/thumbnail_200x266/amorgos_blue_22.jpg)

How can I fix this so that the generated product images are scaled correctly?

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

13 years 3 weeks ago [\#126611](#126611) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Product page image wrong scalling](/forum/26-product-category-display/862586-product-page-image-wrong-scalling#126611 "-- url of the page with the problem -- :   www.imgeater.com/blog/imgeater-download-...-windmills-free.html  -- HikaShop version -- : 2.2.2 -- Joomla version -- : 3.1.5 -- PHP version -- : 5.3.10 -- Browser(s) name and version -- : N/A -- Error-message(debug-mod must be tuned on) -- :N/A  Hello Nicholas,  I got one problem on the thumbnails generation for my main Product page images. I have configured HikaShop to generate Product Page Images with a Width of 266 and a Height of 200. It seems that somehow HikaShop swaps the two dimensions and whatever I do the generated images are assigned with Width = Configured Height = 200 in my example. The DIV is assigned the correct dimensions. Also the folder mentions wrong sizes (266x200).    www.imgeater.com/blog/media/com&#95;hikashop.../amorgos&#95;blue&#95;22.jpg  amorgos&#95;blue&#95;22.jpg = width 200 px instead of 266 px  Please note that normal thumbnails are created correctly:    www.imgeater.com/blog/media/com&#95;hikashop.../amorgos&#95;blue&#95;22.jpg  How can I fix this so that the generated product images are scaled correctly?")*

Hi,

Please edit the view "frontend &#124; your_frontend_template &#124; product &#124; show_block_img" and replace the line (two times): Code:

$img = $this-&gt;image-&gt;getThumbnail(@$image-&gt;file_path, array($height, $width), $image_options);

By: Code:

$img = $this-&gt;image-&gt;getThumbnail(@$image-&gt;file_path, array('height' =&gt; $height, 'width' =&gt; $width), $image_options);

I will generate a new package of HikaShop 2.2.2 with this patch.

Sorry for the inconvenient.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [kostalasa](/forum/user/25499-kostalasa "View kostalasa's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NjI1ODYtcHJvZHVjdC1wYWdlLWltYWdlLXdyb25nLXNjYWxsaW5nP3RtcGw9bWFya2Rvd24=) 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.124 seconds

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

[](#top)
