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

Image Handler 4 (for v1.5.x) Support Thread

Started by divavocals on 8 Apr 2012, 5:13 AM · Views: 345,214

Results 1,561 to 1,580 of 1,691
20 Oct 2016, 4:34 PM
#1561
the_brit avatar

the_brit

New Zenner

Join Date:
Dec 2010
Posts:
13
Plugin Contributions:
0

Post #1561 by the_brit

Hi All.. I'm having a serious issue with all the images on my site, and I'm struggling to work out what's happened. I'm running ZC 1.5.4 and Image Handler4 v4.0 for v1.5.x. We have used Image Handler since day 1 basically, and I'm now getting a error on my backend : "Error: Catalog images directory does not exist: ../images/". I don't have a /images/ folder.. There is a zencart/catalog/images/ folder but there are no files newer than 2012, but makes me wonder if it's a IH4 issue that I've caused.

I'm not quite sure when this started, but I did recently mistakenly change my PHP to 7.0 which broke the site, before I changed it to 5.6 which fixed that issue. Could this have upset IH4? I'm also hoping (probably in vein) that IH4 has put the images in a different directory than the base catalog/images/, and I'm just being extra dumb not being able to find them.

The URL for the catalog is www.orchideu**ro.com (without the *'s of course). Thanks, and sorry if this is a stupid question!

20 Oct 2016, 5:49 PM
#1562
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Post #1562 by carlwhat

first (and unrelated):

i would never use an image name with spaces in it. i would use hyphens instead....

i am not sure what happened on your site, but it does NOT strike me as IH4 related. nor does changing your PHP version to 7 and then back to 5.6.

the question is what happened to your images directory? did you (or someone else) accidentally (or otherwise) delete it? did it accidentally get moved? did the permissions get changed? i'm looking at a hoodie and the image file is:

/images/hoodie%20both.jpg

assuming that file is still on your file system, you would need to find it, and then perhaps we can see what is wrong.

you may have to ask the host for the latest backup if you cannot find the images directory.

good luck!

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

20 Oct 2016, 6:00 PM
#1563
the_brit avatar

the_brit

New Zenner

Join Date:
Dec 2010
Posts:
13
Plugin Contributions:
0

Post #1563 by the_brit

carlwhat:

first (and unrelated):

i would never use an image name with spaces in it. i would use hyphens instead....

i am not sure what happened on your site, but it does NOT strike me as IH4 related. nor does changing your PHP version to 7 and then back to 5.6.

the question is what happened to your images directory? did you (or someone else) accidentally (or otherwise) delete it? did it accidentally get moved? did the permissions get changed? i'm looking at a hoodie and the image file is:

/images/hoodie%20both.jpg

assuming that file is still on your file system, you would need to find it, and then perhaps we can see what is wrong.

you may have to ask the host for the latest backup if you cannot find the images directory.

good luck!

Thanks for your help!! I agree on the 'no spaces in filenames', so I'm not sure why that's there.

I do not have a /images/ directory. There is a /catalog/images/ directory, but the most recent product image in there is from 2012..

I do not have a recent backup on this computer, but may have one on a HDD at home that I will check tonight, just in case a /images/ directory was deleted somehow..

20 Oct 2016, 6:10 PM
#1564
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Post #1564 by carlwhat

what is the root of the store?

on the 1 hand, ZC is complaining that there is no images directory. on the other hand, you say you have something called:

/catalog/images

where is the includes directory in relation to the above location?

are you saying your directory structure is something like:

/ADMIN
/catalog/images
/includes

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

20 Oct 2016, 7:06 PM
#1565
the_brit avatar

the_brit

New Zenner

Join Date:
Dec 2010
Posts:
13
Plugin Contributions:
0

Post #1565 by the_brit

carlwhat:

what is the root of the store?

on the 1 hand, ZC is complaining that there is no images directory. on the other hand, you say you have something called:

/catalog/images

where is the includes directory in relation to the above location?

are you saying your directory structure is something like:

/ADMIN
/catalog/images
/includes

Yes, the structure is:

/catalog/
/catalog/images/
/includes/
/admin/

There is no /images directory in the root, although I believe that is where my ZC is currently looking as per the error it's giving.

22 Oct 2016, 3:56 PM
#1566
katgirl72 avatar

katgirl72

New Zenner

Join Date:
Mar 2016
Location:
NY
Posts:
12
Plugin Contributions:
0

Post #1566 by katgirl72

Hello, Can someone take a quick look at this. I am not sure what I am doing wrong. Most of my images are loaded and look fine but I have this page where the swatches look great with the exception of the last section of printed swatches toward the bottom. I have tried to resize the images and reload and it still looks distorted. I have v1.5.1 zencart. It does not appear that I can edit how swatch images are sized in the config menu or attributes either. http://urbancountrystore.com/index.php?main_page=product_info&cPath=66_82_115_201&products_id=2112

23 Oct 2016, 12:29 AM
#1567
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Post #1567 by carlwhat

katgirl72:

Hello, Can someone take a quick look at this. I am not sure what I am doing wrong. Most of my images are loaded and look fine but I have this page where the swatches look great with the exception of the last section of printed swatches toward the bottom. I have tried to resize the images and reload and it still looks distorted. I have v1.5.1 zencart. It does not appear that I can edit how swatch images are sized in the config menu or attributes either. http://urbancountrystore.com/index.php?main_page=product_info&cPath=66_82_115_201&products_id=2112

i do think the problem is related to IH. it is a CSS issue. related to your edify template. you may be able to resolve it with image sizes, but tough to tell....

if you have developer tools you can change the CSS there.... else look at this file:

http://urbancountrystore.com/includes/templates/edify/css/templatecss.css

~line 513 (probably 515) there is a width option. if you were to change that from 20% to initial, it would change those images so that they would not elongate, but you would have other changes as well....

there are a TON of elements on the page, and it really strikes me as more of a CSS/template issue....

you "could" add a line into image group at line 83:

height: inherit;

and that may may you happier.... but no telling what else might go adrift.

good luck!

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

3 Nov 2016, 10:51 PM
#1568
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Post #1568 by carlwhat

ok, pardon me if this is covered somewhere else....

this burned a lot of time today... and i'm not really sure why it need be....

to start with i had an error on the function resize_imageGD in

includes/classes/bmz_image_handler.class.php

a client had uploaded a .png file as .jpg file. and line 633

$image = @imagecreatefromjpeg($src_name);

suppresses the error, but the page load still dies.

in fact, there is a ton of use of the '@' sign to suppress error messages in this module. which makes trouble-shooting pretty heinous.

instead of having a myDEBUG file, i have nothing and a site that does not work.

perhaps someone has a good reason why this need be like this? and if so, can explain it to me?

thanks.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

13 Nov 2016, 8:58 AM
#1569
steve_1962 avatar

steve_1962

New Zenner

Join Date:
Sep 2016
Location:
Auckland NZ
Posts:
11
Plugin Contributions:
0

Post #1569 by steve_1962

Test site transferred by Go Daddy, the file structure is different to what I am used to.
Starts with .cagefs .cl.selector, files I am used to are in public_html

I took Route 1 in the install instructions.

The only other add-on I am using is Easy Populate 4 although this problem was here before EP4.

http://n e w . d a l v e y n z . c o m

IH resize images yes
IH small images filetype no_change
IH small images background 255:255:255
IH small images compression quality 85
IH small images watermark no
IH small images zoom on hover yes
IH small images zoom on hover size Large
IH medium images filetype no_change
IH medium images background 255:255:255
IH medium images compression quality 85
IH medium images watermark no
IH large images filetype no_change
IH large images background 255:255:255
IH large images compression quality 85
IH large images watermark no
IH large images maximum width 500
IH large images maximum height 0px
IH watermark gravity Center

The BMZ cache has only 6 folders containing a total of 8 images.

I have reinstalled several times, sometimes the BMZ cache has around 16 folders containing up to 120 images. There should be around 500 images.

The hover (zoom) does not appear to be working. Which images on my site should this be working on? I understand that it only works on small images?

The main image is visible on the product list page but not the product detail page. The main image on the product detail page is linked to the /images/medium/dalvey/folder which is empty.

I have large images set to 500px but they display at the original size on clicking from the product detail.

ImageMagick was installed by Go Daddy and appears to be installed correctly:

http://n e w . d a l v e y n z . c o m /ImageMagick.php

This should test for ImageMagick version 6.x
Path: /usr/local/bin/convert
Version return code is 127

Version: ImageMagick 6.7.2-7 2016-06-17 Q16 <http://www.imagemagick.org>
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP
Version: ImageMagick 6.7.2-7 2016-06-17 Q16 <http://www.imagemagick.org>
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP

I just realized this afternoon that I had to edit the bmz_image_handler_conf.php file to reflect the path above (/usr/local/bin/convert) so I am not sure how any images got to the BMZ cache before?

I am beginning to think that I should have rebuilt the site and not had Go Daddy transfer it.

I am pulling my hair out & I didn't have much left to start with. Can anyone point me in the right direction?

Cheers Steve

13 Nov 2016, 9:34 AM
#1570
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Heerenveen, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Post #1570 by design75

I don't think the problem lies with IH, but in you configure.php files. Looking at the image path it looks like this: 'images/dalvey//Cats Current/new.jpg'. As you can see it contains a double /.

Steve 1962:

Test site transferred by Go Daddy, the file structure is different to what I am used to.
Starts with .cagefs .cl.selector, files I am used to are in public_html

I took Route 1 in the install instructions.

The only other add-on I am using is Easy Populate 4 although this problem was here before EP4.

http://n e w . d a l v e y n z . c o m

IH resize images yes
IH small images filetype no_change
IH small images background 255:255:255
IH small images compression quality 85
IH small images watermark no
IH small images zoom on hover yes
IH small images zoom on hover size Large
IH medium images filetype no_change
IH medium images background 255:255:255
IH medium images compression quality 85
IH medium images watermark no
IH large images filetype no_change
IH large images background 255:255:255
IH large images compression quality 85
IH large images watermark no
IH large images maximum width 500
IH large images maximum height 0px
IH watermark gravity Center

The BMZ cache has only 6 folders containing a total of 8 images.

I have reinstalled several times, sometimes the BMZ cache has around 16 folders containing up to 120 images. There should be around 500 images.

The hover (zoom) does not appear to be working. Which images on my site should this be working on? I understand that it only works on small images?

The main image is visible on the product list page but not the product detail page. The main image on the product detail page is linked to the /images/medium/dalvey/folder which is empty.

I have large images set to 500px but they display at the original size on clicking from the product detail.

ImageMagick was installed by Go Daddy and appears to be installed correctly:

http://n e w . d a l v e y n z . c o m /ImageMagick.php

This should test for ImageMagick version 6.x
Path: /usr/local/bin/convert
Version return code is 127

Version: ImageMagick 6.7.2-7 2016-06-17 Q16 <http://www.imagemagick.org>
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP
Version: ImageMagick 6.7.2-7 2016-06-17 Q16 <http://www.imagemagick.org>
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP

I just realized this afternoon that I had to edit the bmz_image_handler_conf.php file to reflect the path above (/usr/local/bin/convert) so I am not sure how any images got to the BMZ cache before?

I am beginning to think that I should have rebuilt the site and not had Go Daddy transfer it.

I am pulling my hair out & I didn't have much left to start with. Can anyone point me in the right direction?

Cheers Steve

13 Nov 2016, 2:03 PM
#1571
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #1571 by mc12345678

On other things, the files in the bmz_cache directory if not already transferred over from the previous location are generated "on demand" rather than suddenly present upon installation of IH. It is possible to "visit" every image to have them generated, but it needs to also be governed to not overload the system.

IH does not make uploaded images larger than what has been provided. This is why the instructions state to upload the largest image size. It uniformly and with quality makes the images the same size or, as necessary, smaller than the original. If you upload an image that is 25x25, then it would be shown in "box" that is 500x500, but right in the middle at the size of 25x25.

As to the hover/"zoom" image this is described in the readme for the plugin. At the moment I forget some of the detail, but I know that the image identified as the/a Medium image (generally the product info page's main product image) does not offer the "pop-up on hover" image. Otherwise, there are other settings as well, file placement, page html validation, etc... These all play a factor in that aspect, but of course, need to have the file paths correct to begin with. :)

Steve 1962:

Test site transferred by Go Daddy, the file structure is different to what I am used to.
Starts with .cagefs .cl.selector, files I am used to are in public_html

I took Route 1 in the install instructions.

The only other add-on I am using is Easy Populate 4 although this problem was here before EP4.

http://n e w . d a l v e y n z . c o m

IH resize images yes
IH small images filetype no_change
IH small images background 255:255:255
IH small images compression quality 85
IH small images watermark no
IH small images zoom on hover yes
IH small images zoom on hover size Large
IH medium images filetype no_change
IH medium images background 255:255:255
IH medium images compression quality 85
IH medium images watermark no
IH large images filetype no_change
IH large images background 255:255:255
IH large images compression quality 85
IH large images watermark no
IH large images maximum width 500
IH large images maximum height 0px
IH watermark gravity Center

The BMZ cache has only 6 folders containing a total of 8 images.

I have reinstalled several times, sometimes the BMZ cache has around 16 folders containing up to 120 images. There should be around 500 images.

The hover (zoom) does not appear to be working. Which images on my site should this be working on? I understand that it only works on small images?

The main image is visible on the product list page but not the product detail page. The main image on the product detail page is linked to the /images/medium/dalvey/folder which is empty.

I have large images set to 500px but they display at the original size on clicking from the product detail.

ImageMagick was installed by Go Daddy and appears to be installed correctly:

http://n e w . d a l v e y n z . c o m /ImageMagick.php

This should test for ImageMagick version 6.x
Path: /usr/local/bin/convert
Version return code is 127

Version: ImageMagick 6.7.2-7 2016-06-17 Q16 <http://www.imagemagick.org>
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP
Version: ImageMagick 6.7.2-7 2016-06-17 Q16 <http://www.imagemagick.org>
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP

I just realized this afternoon that I had to edit the bmz_image_handler_conf.php file to reflect the path above (/usr/local/bin/convert) so I am not sure how any images got to the BMZ cache before?

I am beginning to think that I should have rebuilt the site and not had Go Daddy transfer it.

I am pulling my hair out & I didn't have much left to start with. Can anyone point me in the right direction?

Cheers Steve

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

19 Nov 2016, 4:08 AM
#1572
steve_1962 avatar

steve_1962

New Zenner

Join Date:
Sep 2016
Location:
Auckland NZ
Posts:
11
Plugin Contributions:
0

Post #1572 by steve_1962

mc12345678:

On other things, the files in the bmz_cache directory if not already transferred over from the previous location are generated "on demand" rather than suddenly present upon installation of IH. It is possible to "visit" every image to have them generated, but it needs to also be governed to not overload the system.

IH does not make uploaded images larger than what has been provided. This is why the instructions state to upload the largest image size. It uniformly and with quality makes the images the same size or, as necessary, smaller than the original. If you upload an image that is 25x25, then it would be shown in "box" that is 500x500, but right in the middle at the size of 25x25.

As to the hover/"zoom" image this is described in the readme for the plugin. At the moment I forget some of the detail, but I know that the image identified as the/a Medium image (generally the product info page's main product image) does not offer the "pop-up on hover" image. Otherwise, there are other settings as well, file placement, page html validation, etc... These all play a factor in that aspect, but of course, need to have the file paths correct to begin with. :)

Thanks MC

File paths corrected.

The bmz_cache directory files were not transferred from the previous location.

I have uploaded images as large as 1500px. IH large images maximum set to 500 x 500px but displaying at the original larger size.

On the product detail pages the main image is missing and pointing at http://new.d a l v e y n z.com/images/medium/dalvey/03324.jpg. The medium folder is empty.

It is as if there is no connection between IH and ZC.

8 Dec 2016, 4:48 PM
#1573
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Post #1573 by schoolboy

Steve 1962:

Thanks MC

File paths corrected.

The bmz_cache directory files were not transferred from the previous location.

I have uploaded images as large as 1500px. IH large images maximum set to 500 x 500px but displaying at the original larger size.

On the product detail pages the main image is missing and pointing at http://new.d a l v e y n z.com/images/medium/dalvey/03324.jpg. The medium folder is empty.

It is as if there is no connection between IH and ZC.

I am using ZC 1.5.5.b and installed IH, then went through all the processes of visiting product pages to generate the BMZ cached images. Worked for a bit, then also (like you) failed to load images on product_info pages. BMZ cache folder empty... Uninstalled IH4 and removed all folders/files, then restored site backup. Back to original functionality so all OK.

If you are also using ZC1.5.5b, it may be that IH4 is not compatible...

20 years a Zencart User

13 Dec 2016, 7:13 PM
#1574
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Post #1574 by delia

Diva, old friend, (yes, I am still alive!) I have a question that may not have been addressed before. Is there some way to change where the bmz_cache is kept? The cart would be in a subfolder with the bmz_cache folder in the root. I suspect I would be the only person to ever ask this as it is a special situation. I tried to find in the files where that folder designation is made but a find in dreamweaver did not work.

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

14 Dec 2016, 2:54 AM
#1575
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #1575 by mc12345678

schoolboy:

I am using ZC 1.5.5.b and installed IH, then went through all the processes of visiting product pages to generate the BMZ cached images. Worked for a bit, then also (like you) failed to load images on product_info pages. BMZ cache folder empty... Uninstalled IH4 and removed all folders/files, then restored site backup. Back to original functionality so all OK.

If you are also using ZC1.5.5b, it may be that IH4 is not compatible...

Have installed on a ZC 1.5.5b site with no issues, able to navigate the product pages without loss of the image(s). There are a few other things seen that could cause a problem or be caused to have a problem, but if you are further interested in it working on your site as provided then would need to know more information about your configuration and system history (ie, posting tips information).

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

14 Dec 2016, 4:29 AM
#1576
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #1576 by mc12345678

delia:

Diva, old friend, (yes, I am still alive!) I have a question that may not have been addressed before. Is there some way to change where the bmz_cache is kept? The cart would be in a subfolder with the bmz_cache folder in the root. I suspect I would be the only person to ever ask this as it is a special situation. I tried to find in the files where that folder designation is made but a find in dreamweaver did not work.

Search in github identifies that after installation will want to touch/work with the definition as provided in: includes/extra_configures/bmz_io_conf.php at or around line 19. The installer (YOUR_ADMIN/includes/init_includes/init_image_handler.php) also has a reference to the bmz_cache directory so that it copies information to the correct location.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

21 Dec 2016, 12:10 AM
#1577
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Post #1577 by schoolboy

mc12345678:

Have installed on a ZC 1.5.5b site with no issues, able to navigate the product pages without loss of the image(s). There are a few other things seen that could cause a problem or be caused to have a problem, but if you are further interested in it working on your site as provided then would need to know more information about your configuration and system history (ie, posting tips information).

We have a few sites on a virtual server, so all using the same versions and configutrations of apache, php etc. Hosting is with TerraNetwork, who not only know what they are doing technically, but have a wealth of knowledge on zencart and ecommerce in general. Terra was owned by Rhea Anthony (ZC user "Vger") who was one of the founders of OsCommerce - she sadly passed away a few years ago, but the current owners and tech team are superb. So the hosting environment is properly configured to run ZC and the majority of its (properly built) plugins.

We have been using IH for many years and on almost all the websites we've built or owned - over 300 to date - and it has never been a problem. With the latest site, we're using one of picaflor's templates (westminster_new) and this has (built-in) zen lightbox and fual slimbox. I don't like either of these systems and have never installed them on our sites (though I have tinkered with them on dev sites). With installation of IH over Lightbox, there are some requirements to pay attention to code structures in certain files. I did a full Beyond-Compare analysis of all files and code differences, but could find very little difference that would affect behaviour, or cause conflict. According to IH installation instructions, these modules should play nicely together...

But for some reason, it's not playing nicely on this westminster_new template and ZC 1.5.5b .

Im busy getting the dev site completed with all the plugins we need (with the exception of IH right now) and because I am in a hurry to make it live, we will launch the site without IH. Then I can mess around with the dev copy to see what I can find.

If at that stage I come to a dead end, I'll come back here for more pointers and advice, but thanks a ton for showing interest in helping. I really appreciate what you contribute to this forum.

20 years a Zencart User

22 Dec 2016, 7:04 PM
#1578
philou avatar

philou

Zen Follower

Join Date:
Jan 2006
Posts:
165
Plugin Contributions:
1

Post #1578 by philou

Hi,

just spend a whole evening trying to figure out why IH4 wasn't scaling my uploaded images. It just kept the large uploaded JPG for all three sizes small, med, large.

Reason: In Admin -> Configuration -> Images I had set: Product Info - Image Large Suffix to "_LRG"

Since I am updating an older ZC Shop to 1.5.5 all large images we had created for products and now wanted to upload have the suffix "_LRG", i.e. Prod_image_LRG.jpg

Turns out IH will not scale these images down to medium or small. (Code is in function "determine_image_sizetype()" inside ZC/includes/classes/bmz_image_handler.class.php)

Not sure if this is a bug or a feature, but it surely would be worth mentioning in the Troubleshooting section of the manual.

Best regards,
P.

27 Dec 2016, 2:29 AM
#1579
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Post #1579 by carlwhat

i think i have spoken about this before.... unfortunately my memory is not what it once was....

while certain uses of '@' to suppress error messages are possibly worth wild, the inordinate amount of them in this plugin makes it rather frustrating.

the bmz_image_handler.class.php file will suppress error messages and cause a script to fail. specifically the functions:

imagecreatefromgif
imagecreatefrompng
imagecreatefromjpeg

i'm not sure how many others have clients who do not know the difference between a jpg and a png; but mine don't and will use whatever extension they feel like. so now you have a script failing and no error messages.... kind of a pain....

in addition, there is a php function: exif_imagetype() which will determine the file type. now i know i could make some changes and submit a new version, but prior to doing that, i'm curious if other people have this same problem.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

27 Dec 2016, 8:19 AM
#1580
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #1580 by mc12345678

philou:

Hi,

just spend a whole evening trying to figure out why IH4 wasn't scaling my uploaded images. It just kept the large uploaded JPG for all three sizes small, med, large.

Reason: In Admin -> Configuration -> Images I had set: Product Info - Image Large Suffix to "_LRG"

Since I am updating an older ZC Shop to 1.5.5 all large images we had created for products and now wanted to upload have the suffix "_LRG", i.e. Prod_image_LRG.jpg

Turns out IH will not scale these images down to medium or small. (Code is in function "determine_image_sizetype()" inside ZC/includes/classes/bmz_image_handler.class.php)

Not sure if this is a bug or a feature, but it surely would be worth mentioning in the Troubleshooting section of the manual.

Best regards,
P.

Would say that its somewhat neither.

While unfortunately the resizing aspect of the plugin was not operating under this condition and one might think that it is an issue with the plugin, the instructions indicate that images should be named in accordance with ZC process. Seems that the need for this is pretty well covered in this FAQ which is one of the links referenced on the troubleshooting tab in the Zen Cart and Image Management section of the instructions.

While the documents don't come out and say: if the filename ends with or includes the same text as assigned to the image suffix that "this" will happen; however, it does indicate how to name images for various product and sizes. That link, and others in the plugin help file, identifies the need to use different naming for different purposes. Yes, it is understandable that in the older version where the large image (having _LRG as the suffix) would be the one desired to be uploaded in accordance with the instructions, but in order to maintain the same files with/without changing the filenames (maintaining the base name to include _LRG), additional action is necessary. Either the filename suffix would have to be modified or the files/base filenames would need to be renamed. Thing is that technically the database (upgraded from the previous version, correct?) should already have all of the image information for the main product image name, so it seems that it comes back to the filename(s) or the extension. The filename can be addressed through one of the file renaming utilities or the database can be modified to look for a large image that has a different "ending" than _LRG.

Both of those are generally discussed above, but in a somewhat search for similar helpfile additions, this particular condition/situation was explained as being obscure, or unlikely as discussed on and before a discussion about the very code section identified above. The small number of reported occurrences and likelihood of occurrence when following the established guidelines/instructions make modifications appear to be made just for the sake of making them rather than bringing things back to the proper path.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...