If this is your first visit, check our documentation. To post, register or login.
Forums / All Other Contributions/Addons / Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

Started by lat9 on 15 Oct 2017, 3:54 PM · Views: 160,515

Results 761 to 774 of 774
29 Sep 2026, 8:08 PM
#761
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,880
Plugin Contributions:
7

Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

>In the first case you need IH to manage images in admin,

Really? I've never done that. As long as the additional files are correctly named, they display automatically. No need to manage anything. Ever.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

30 Sep 2026, 8:24 AM
#762
rlexyd avatar

rlexyd

Zen Follower

Join Date:
Nov 2006
Location:
Sydney, Australia
Posts:
507
Plugin Contributions:
0

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

Thank for your replies.

Ok, I went into admins' configuration/images setting and noticed the small image width was '0' while the height was '250', I changed the small image width to '90' and it fixed it 😄.

It's so weird as other image settings had '0' on just width yet they displayed fine.

The "Product Info - Number of Additional Images per Row" setting doesn't work as I set the number to 3 yet the additional images that show up different quantity than what is set!

I have attached two snapshots of 1st, Settings in admins' configuration/images AND 2nd, Setting in Image Handler Configuration (please view URL below for both snapshots). Can you please look at the settings and advise if they are ok? Also, under admin/config/images, not sure why it says (IH version .4.), shouldn't say 5 instead of 4? It does however say IH5 in image handler configuration.

https://imgur.com/a/wfU7RQt

Another thing, when I click on an image and click on it again it closes, isn't it meant to cycle between images instead of having to click each image separately?

Also, the featured-sidebox small image is too small and doesn't matter what settings I change in admins' configuration/images, it doesn't change?!

Thanks again for your help.

*Zen Cart eCommerce Solution - Putting the Dream of Owning an Online Business within reach of anyone!

30 Sep 2026, 9:22 AM
#763
rlexyd avatar

rlexyd

Zen Follower

Join Date:
Nov 2006
Location:
Sydney, Australia
Posts:
507
Plugin Contributions:
0

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

I just realised changing the 'Small Image Width' in admins' config/images from '0' to '90', fixes the additional image display but it makes the Featured Sidebox images 90px which is too small, if I change the 'Small Image Width' in admins' config/images back to '0', it fixes the Featured Sidebox size but changes the additional image size to 0px.

This must be an issue with something I've done, not sure what though?!🙁

*Zen Cart eCommerce Solution - Putting the Dream of Owning an Online Business within reach of anyone!

30 Sep 2026, 2:45 PM
#764
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
416
Plugin Contributions:
6

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

The version display seems to have a bug.

@lat9

The version numner in database is saved correctly but it has trim( as a set function, but display of configuration values is coded for zen_cfg_select_option(. See line 247 of admin/configuration.php.

                $set_function = $item['set_function'] . '\'' . $safe_value . '\', \'' . $fieldName . '\')';

$fieldname is 'cfg_' + the config ID number. In my case this becomes:

$set_function = 'trim(\'5.4.0\', \'cfg_589\')';

This removes any character in 'cfg_589' from the beginning or end of the version string. The result is .4.0 . For rlexyd, it is .4. because its config ID contains 0 and 5...

Perhaps the trim function should be removed?

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

1 Oct 2026, 12:03 PM
#765
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

pilou2:

The version display seems to have a bug.

@lat9

The version numner in database is saved correctly but it has trim( as a set function, but display of configuration values is coded for zen_cfg_select_option(. See line 247 of admin/configuration.php.

                $set_function = $item['set_function'] . '\'' . $safe_value . '\', \'' . $fieldName . '\')';

$fieldname is 'cfg_' + the config ID number. In my case this becomes:

$set_function = 'trim(\'5.4.0\', \'cfg_589\')';

This removes any character in 'cfg_589' from the beginning or end of the version string. The result is .4.0 . For rlexyd, it is .4. because its config ID contains 0 and 5...

Perhaps the trim function should be removed?

I "should have" changed that trim to zen_cfg_read_only a couple of years ago! See this GitHub issue for tracking: https://github.com/lat9/zen_Image-Handler/issues/30

9 Oct 2026, 12:11 PM
#766
dml73 avatar

dml73

Zen Follower

Join Date:
Oct 2007
Posts:
416
Plugin Contributions:
0

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

I'm using IH v5.3.5 and ZC v2.1.0.

When checking my product pages, for example this one:
https://www.usconverters.com/rs232-rs485-converter-xs201a

in PageSpeed Insights (https://pagespeed.web.dev/)

it looks like the large images, 1024x1024 in my case, are being loaded/used as small additional images. Apparently this is using extra KB/time, making the page slower. Any ideas how this could be changed so the small (80x80) images are loaded instead of the large ones (1024x1024)?

9 Oct 2026, 1:04 PM
#767
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

@dml73, other than not including those larger images, I've got no good answer for you. The large images are loaded so that they can be displayed on the click of a button.

14 Oct 2026, 5:56 AM
#768
dml73 avatar

dml73

Zen Follower

Join Date:
Oct 2007
Posts:
416
Plugin Contributions:
0

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

Would it be possible to wait with loading those large images until the user clicks the small additional images?

14 Oct 2026, 11:52 AM
#769
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

dml73:

Would it be possible to wait with loading those large images until the user clicks the small additional images?

Image Handler handles only the image files, not how they're displayed. That's under control of your template's additional-images' rendering.

15 Oct 2026, 7:02 AM
#770
rlexyd avatar

rlexyd

Zen Follower

Join Date:
Nov 2006
Location:
Sydney, Australia
Posts:
507
Plugin Contributions:
0

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

I've had to start from scratch, installed IH5.4.0 on clean zencart v2.2.2 on PHP 8.2.

I was manually adding products and got this error in log a couple of times.

[15-Oct-2026 16:11:12 Australia/Sydney] Request URI: //, IP address: 000, Language id 1

#0 [internal function]: zen_debug_error_handler()

#1 /includes/classes/bmz_image_handler.class.php(960): imagecreatefrompng()

#2 /includes/classes/bmz_image_handler.class.php(763): ih_image->load_imageGD()

#3 /includes/classes/bmz_image_handler.class.php(443): ih_image->resize_imageGD()

#4 /includes/classes/bmz_image_handler.class.php(286): ih_image->get_resized_image()

#5 /includes/functions/extra_functions/functions_bmz_image_handler.php(154): ih_image->get_local()

#6 /includes/functions/html_output.php(220): handle_image()

#7 /includes/modules/MY_TEMPLATE/new_products.php(80): zen_image()

#8 /includes/templates/template_default/templates/tpl_modules_whats_new.php(11): include('/home2/rlexyd...')

#9 /includes/templates/template_default/templates/tpl_index_default.php(59): require('/home2/rlexyd...')

#10 /includes/modules/pages/index/main_template_vars.php(232): require('/home2/rlexyd...')

#11 /includes/templates/MY_TEMPLATE/common/tpl_main_page.php(185): require('/home2/rlexyd...')

#12 /index.php(109): require('/home2/rlexyd...')

--> PHP Warning: imagecreatefrompng(): gd-png: libpng warning: iCCP: known incorrect sRGB profile in /includes/classes/bmz_image_handler.class.php on line 960.

Any ideas?

I noticed it says PNG in error so I went through the /images/ folder and can't see any .png images. I only upload .jpg as images.

*Zen Cart eCommerce Solution - Putting the Dream of Owning an Online Business within reach of anyone!

15 Oct 2026, 1:49 PM
#771
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

You've got one or more images with a .jpg file extension that "identify" as a .png formatted file. That "image-type" is returned by the PHP function getimagesize.

15 Oct 2026, 8:33 PM
#772
rlexyd avatar

rlexyd

Zen Follower

Join Date:
Nov 2006
Location:
Sydney, Australia
Posts:
507
Plugin Contributions:
0

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

Thanks, I thought it might be that from the error log, even though all image types where .jpg.

I ran a windows batch script and got the 1 culprit 😛

Thank you once again.

In case anyone else has the same problem, here's my solution. In Windows 10, after enabling view File Name Extensions in File Explorer, I created a blank text file, added the blow command in it, renamed it check_png.bat and placed it in the folder I wanted scanned and clicked on it to run it the script.

@echo off

setlocal enabledelayedexpansion

powershell -NoProfile -Command "Get-ChildItem -Filter *.jpg | ForEach-Object { $bytes = Get-Content -Encoding Byte -TotalCount 4 -Path $_.FullName; if ($bytes[0] -eq 0x89 -and $bytes[1] -eq 0x50 -and $bytes[2] -eq 0x4E -and $bytes[3] -eq 0x47) { Write-Output ('Mismatched file found: ' + $_.Name) } }"

pause

*Zen Cart eCommerce Solution - Putting the Dream of Owning an Online Business within reach of anyone!

15 Oct 2026, 8:38 PM
#773
rlexyd avatar

rlexyd

Zen Follower

Join Date:
Nov 2006
Location:
Sydney, Australia
Posts:
507
Plugin Contributions:
0

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

Thanks, I thought it might be that from the error log, even though all image types where .jpg.

I ran a windows batch script and got the 1 culprit 😛

Thank you once again.

In case anyone else has the same problem, here's my solution. In Windows 10, after enabling view File Name Extensions in File Explorer, I created a blank text file, added the blow command in it, renamed it check_png.bat and placed it in the folder I wanted scanned and clicked on it to run the script.

@echo off

setlocal enabledelayedexpansion

powershell -NoProfile -Command "Get-ChildItem -Filter *.jpg | ForEach-Object { $bytes = Get-Content -Encoding Byte -TotalCount 4 -Path $_.FullName; if ($bytes[0] -eq 0x89 -and $bytes[1] -eq 0x50 -and $bytes[2] -eq 0x4E -and $bytes[3] -eq 0x47) { Write-Output ('Mismatched file found: ' + $_.Name) } }"

pause

*Zen Cart eCommerce Solution - Putting the Dream of Owning an Online Business within reach of anyone!

16 Oct 2026, 8:21 AM
#774
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,880
Plugin Contributions:
7

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

I note that Irfanview would have spat out that mismatch just while browsing the files in the directory (and has batch processing functions that cover all eventualities that I've needed in 20 years, so recommended as a default image viewer).

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...