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

#   Error message on search page, caused by large image.

##

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

Less More

- Posts: 13
- Thank you received: 0
-
-

9 years 1 month ago -  9 years 1 month ago [\#280709](#280709) by [kovoks](/forum/user/38126-kovoks "View kovoks's Profile")  *[Error message on search page, caused by large image.](/forum/26-product-category-display/892414-error-message-on-search-page-caused-by-large-image#280709 "-- url of the page with the problem -- :   www.sukrin.nl/component/search/?searchwo...ase=all&amp;limitstart=0  -- HikaShop version -- : 3.2.0 -- Joomla version -- : 3.8.1 -- PHP version -- : 7.1.10 -- Browser(s) name and version -- : Not relevant. -- Error-message(debug-mod must be tuned on) -- : WARNING&#95;IMAGE&#95;TOO&#95;BIG&#95;FOR&#95;MEMORY  Hi,  We were hit with the error message WARNING&#95;IMAGE&#95;TOO&#95;BIG&#95;FOR&#95;MEMORY in the search results. This was caused by somewhat big image.  The calculation you apply in administrator/components/com&#95;hikashop/helpers/image.php is this:  The image is 6778x4524 in dimensions. Meaning that you calculate roughly 250MB for the resize. The original image is 5.2M  There are a couple problems:  &#42; That calculation is very rough, I think 8 times the size of the image is to much, it should be set to something lower.  &#42; There are no thumbnails in the search result, so the check is hit at the wrong time  &#42; The function is guarded with a image&#95;check&#95;memory config option, but there is no corresponding GUI setting  I've now set that config option to false to not hit this error message, but should be fixed so we don't overwrite it on the next update.")* was created by *[kovoks](/forum/user/38126-kovoks "View kovoks's Profile")*

-- url of the page with the problem -- : [ www.sukrin.nl/component/search/?searchwo...ase=all&amp;limitstart=0](https://www.sukrin.nl/component/search/?searchword=cake&searchphrase=all&limitstart=0)
-- HikaShop version -- : 3.2.0
-- Joomla version -- : 3.8.1
-- PHP version -- : 7.1.10
-- Browser(s) name and version -- : Not relevant.
-- Error-message(debug-mod must be tuned on) -- : WARNING_IMAGE_TOO_BIG_FOR_MEMORY

Hi,

We were hit with the error message WARNING_IMAGE_TOO_BIG_FOR_MEMORY in the search results. This was caused by somewhat big image.

The calculation you apply in administrator/components/com\_hikashop/helpers/image.php is this:
Code:

$estimation = (($origin-&gt;width * $origin-&gt;height) + ($e_x * $e_y)) * 8;

The image is 6778x4524 in dimensions. Meaning that you calculate roughly 250MB for the resize. The original image is 5.2M

There are a couple problems:

- That calculation is very rough, I think 8 times the size of the image is to much, it should be set to something lower.
- There are no thumbnails in the search result, so the check is hit at the wrong time
- The function is guarded with a image\_check\_memory config option, but there is no corresponding GUI setting

I've now set that config option to false to not hit this error message, but should be fixed so we don't overwrite it on the next update.

Last edit: 9 years 1 month ago by [kovoks](/forum/user/38126-kovoks "View kovoks's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84OTI0MTQtZXJyb3ItbWVzc2FnZS1vbi1zZWFyY2gtcGFnZS1jYXVzZWQtYnktbGFyZ2UtaW1hZ2U/dG1wbD1tYXJrZG93bg==) 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: 86584
- Thank you received: 14325
-
-

9 years 1 month ago [\#280712](#280712) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Error message on search page, caused by large image.](/forum/26-product-category-display/892414-error-message-on-search-page-caused-by-large-image#280712 "-- url of the page with the problem -- :   www.sukrin.nl/component/search/?searchwo...ase=all&amp;limitstart=0  -- HikaShop version -- : 3.2.0 -- Joomla version -- : 3.8.1 -- PHP version -- : 7.1.10 -- Browser(s) name and version -- : Not relevant. -- Error-message(debug-mod must be tuned on) -- : WARNING&#95;IMAGE&#95;TOO&#95;BIG&#95;FOR&#95;MEMORY  Hi,  We were hit with the error message WARNING&#95;IMAGE&#95;TOO&#95;BIG&#95;FOR&#95;MEMORY in the search results. This was caused by somewhat big image.  The calculation you apply in administrator/components/com&#95;hikashop/helpers/image.php is this:  The image is 6778x4524 in dimensions. Meaning that you calculate roughly 250MB for the resize. The original image is 5.2M  There are a couple problems:  &#42; That calculation is very rough, I think 8 times the size of the image is to much, it should be set to something lower.  &#42; There are no thumbnails in the search result, so the check is hit at the wrong time  &#42; The function is guarded with a image&#95;check&#95;memory config option, but there is no corresponding GUI setting  I've now set that config option to false to not hit this error message, but should be fixed so we don't overwrite it on the next update.")*

Hi,

- The orginal image is compressed. When PHP loads the image in memory, it uncompresses it in a raw format, and thus, it uses 8 bits of memory for each pixel in the image. So no, it's totally normal. Note that this check is in place to avoid fatal error messages, so that you get a more meaningful message and not a blank page.

- Even if there are no thumbnails on the search results, the images thumbnails are still computed because some alternatives to the Joomla default search system ask for the URL of the thumbnails in the returned results of the search plugins. For example, the extension [ extensions.joomla.org/extension/universal-ajax-live-search/](https://extensions.joomla.org/extension/universal-ajax-live-search/) has an ajax search module which uses the thumbnails even though it uses the standard search triggers of Joomla.
And the plugins have no way of knowing who is calling for the search so it always compute the thumbnails: in fact it only computes it once and once generated, it will directly give the link, without having to regenerate the thumbnail.

- That's on purpose. We've added a hidden parameter when we added that check so that if someone had a special case we didn't thought of, they would be able to disable the check by adding an entry to the table hikashop_config. And you won't loose that setting in the database with the updates. Once a setting is in hikashop_config, it's not replaced, like we don't change your configuration settings values when you update HikaShop, unless there is a really really good reason for it.
It's the same as the difference between the options interface of your browser, and the about:config page which has a huge table of parameters that usually you don't want to change but you still can.

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

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

Less More

- Posts: 13
- Thank you received: 0
-
-

9 years 1 month ago [\#280771](#280771) by [kovoks](/forum/user/38126-kovoks "View kovoks's Profile")  Replied by *[kovoks](/forum/user/38126-kovoks "View kovoks's Profile")* on topic *[Error message on search page, caused by large image.](/forum/26-product-category-display/892414-error-message-on-search-page-caused-by-large-image#280771 "-- url of the page with the problem -- :   www.sukrin.nl/component/search/?searchwo...ase=all&amp;limitstart=0  -- HikaShop version -- : 3.2.0 -- Joomla version -- : 3.8.1 -- PHP version -- : 7.1.10 -- Browser(s) name and version -- : Not relevant. -- Error-message(debug-mod must be tuned on) -- : WARNING&#95;IMAGE&#95;TOO&#95;BIG&#95;FOR&#95;MEMORY  Hi,  We were hit with the error message WARNING&#95;IMAGE&#95;TOO&#95;BIG&#95;FOR&#95;MEMORY in the search results. This was caused by somewhat big image.  The calculation you apply in administrator/components/com&#95;hikashop/helpers/image.php is this:  The image is 6778x4524 in dimensions. Meaning that you calculate roughly 250MB for the resize. The original image is 5.2M  There are a couple problems:  &#42; That calculation is very rough, I think 8 times the size of the image is to much, it should be set to something lower.  &#42; There are no thumbnails in the search result, so the check is hit at the wrong time  &#42; The function is guarded with a image&#95;check&#95;memory config option, but there is no corresponding GUI setting  I've now set that config option to false to not hit this error message, but should be fixed so we don't overwrite it on the next update.")*

Thanks a lot for your detailled explanation. Makes a lot of sense now. Thanks for taking the time to look at this issue.

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

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