Re: Image Handler 2 Support
Just installed IH2 and had a few questions that I couldn't find answers to.
I create sub-directories for each product type I have so that no one directory has too many files and also it's easier to work with when I have to search using ftp. FTP generally have a limit of 2000 files for displaying. My suppliers sometimes use the same image name for both large and small images but seperate them in directories for large and small.
Example: images/wrappers
images/wrappers/small
images/wrappers/large
Since I am working with over 10K items this seems to keep me from going insane.
Question:
1. Does IM2 recreate the images again in one directory?
2. Does IM2 create a large disk usage with duplicate images
create from the originals?
3. Does the current directory structure fit with IM2?
Thanks in advance
Re: Image Handler 2 Support
Quote:
Originally Posted by
DivaVocals
.....But I don't know why the files and folder in your bmz_cache would explicitly set to 777.. The files and folders inside the bmz_cache folders should inherit their permissions from the parent folder (bmz_cache)
Thanks.
Just to clarify: the folders are not the problem. They are correctly being set at 755. One built-in extra function takes care of that
Code:
return @mkdir($target, 0755);
The problem is with the files within the subfolders 0,1,2, ... a,b,c etc which are being set at 777.
Ofc I could easily set all existing files within these subfolders to inherit permissions. In that case they would all be set to 755 as well.
Re: Image Handler 2 Support
Quote:
Originally Posted by
frank18
Thanks.
Just to clarify: the folders are
not the problem. They are correctly being set at 755. One built-in extra function takes care of that
Code:
return @mkdir($target, 0755);
The problem is with
the files within the subfolders 0,1,2, ... a,b,c etc which are
being set at 777.
Ofc I could easily set all existing files within these subfolders to inherit permissions. In that case they would all be set to 755 as well.
For most users of this mod IH2 sets the bmz_cache folders to 775, and inheritance takes care of the contents of the files and folders within bmz_cache.. But if this is not what you want (because you want different permissions for the contents of bmz_cache), then your cron routine sounds like it will do the trick..
Re: Image Handler 2 Support
I'm confused!
It seems that I am duplicating files on the server by creating my own directories with images in them. Please correct my logic below.
Most of my products have a different Large and small images which are stored by product type and size.
placecards/small/image.jpg
placecards/large/image.jpg
When I create the item I define the default image in ZC with it's directory. ex. placecards/small/image.jpg
This then creates the rendered image for the 3 sizes in IH2
I then edit the large image in IH2 to replace the small image to the correct large one. But it only allows for an upload of an image on my computer and not from the server. This in turn upload the image to it's own folder. thus just adding files into one IH2 directory. So based on this I am duplicating the files on the server.
placecards/large/image.jpg is never used since IH2 requires to upload into it's own directory.
So from what I can see, other than the default image there is really no way of organizing images in a useful manner with IH2.
And there is no easy way of editing more than one item at a time to change images as I have to with the different large images per item.
Is this correct?
I also cannot find where the IH2 item images are defined in the database. As I was hoping to maybe sql the changes needed for the large images.
Thanks in advance.
Re: Image Handler 2 Support
Quote:
Originally Posted by
jmuniz
I'm confused!
It seems that I am duplicating files on the server by creating my own directories with images in them. Please correct my logic below.
Most of my products have a different Large and small images which are stored by product type and size.
placecards/small/image.jpg
placecards/large/image.jpg
When I create the item I define the default image in ZC with it's directory. ex. placecards/small/image.jpg
This then creates the rendered image for the 3 sizes in IH2
I then edit the large image in IH2 to replace the small image to the correct large one. But it only allows for an upload of an image on my computer and not from the server. This in turn upload the image to it's own folder. thus just adding files into one IH2 directory.
I'm not sure that you understand in full how IH2 works..
You do not need to create small, or medium images.. Upload the large image and IH2 takes care of generating the required small and medium images (based on your image size setting in Configuration > Images)
Simply put here's how IH2 works..
- Set your image settings (see the readme for instructions)
- Using either the IH2 interface or the product management interface, upload the product LARGE image.
- IH2 will take care of creating the small and medium images.
IH2 also takes care to properly name images to follow Zen Cart's required naming convention for additional product images. This means then when you upload additional images you do not have to worry about properly naming them, IH2 will take casre of it when you upload the image..
Quote:
Originally Posted by
jmuniz
So based on this I am duplicating the files on the server.
placecards/large/image.jpg is never used since IH2 requires to upload into it's own directory
This is not correct..
IH2 CANNOT work without the "images" directory. It's not as you put it simply a matter of IH2 uploading files in it's own directory.. The purpose of the IH2 cache directory is to help with image performance by caching the images in order to improve page load performance. To create this cache, IH2 must get the image information form the original "source" In this case it's the images directory (and it's sub-directories)
Quote:
Originally Posted by
jmuniz
image there is really no way of organizing images in a useful manner with IH2.
And there is no easy way of editing more than one item at a time to change images as I have to with the different large images per item.
Is this correct?
Are you referring to the bmz_cache directory?? Ummmmmm WHY would you want to "organize" them.. You don't need to "organize" these folders at all.. You can "organize" your images folder which will have NO BEARING on IH2s ability to manage and cache your images..
Quote:
Originally Posted by
jmuniz
I also cannot find where the IH2 item images are defined in the database. As I was hoping to maybe sql the changes needed for the large images.
Thanks in advance.
Again I'm not sure you are fully understanding how IH2 works.. IH2 doesn't define ANY images in the database.. Rather it uses the product image information to generate the cache directory it creates..
Re: Image Handler 2 Support
You do not need to create small, or medium images.. Upload the large image and IH2 takes care of generating the required small and medium images (based on your image size setting in Configuration > Images)
That's great if you only have one image that you'd like to display for the item in all the sizes. In my case I have different images for small vs large. So I'd have to manually work with every item to add the different Large image after creating the item with the "default image" this being the small image.
This is very consuming and very impractical when you have many thousands of items. Just to start, I will be loading over 15K T-shirts, 4K candy items, 2-3K personalized party favors, etc...
IH2 CANNOT work without the "images" directory. It's not as you put it simply a matter of IH2 uploading files in it's own directory.. The purpose of the IH2 cache directory is to help with image performance by caching the images in order to improve page load performance. To create this cache, IH2 must get the image information form the original "source" In this case it's the images directory (and it's sub-directories)
What I have seen is IH2 will use the default image and directory from the Zen item creation (I use EZ Populate for this) to create it's cached version in all the sizes. Then when the "Large" image is edited in IH2, IH2 will upload this new image into the directory images/large/original directory name/
I created an item whose default image is located in images/placecard
When I edited the large image in IH2 it uploaded the new Large image into /images/large/placecard
Is there a way to have the Large images already uploaded in the same fashion and naming convention (_LRG.) and defined to the item without manually editing each item IH2?
Re: Image Handler 2 Support
Quote:
Originally Posted by
jmuniz
You do not need to create small, or medium images.. Upload the large image and IH2 takes care of generating the required small and medium images (based on your image size setting in Configuration > Images)
That's great if you only have one image that you'd like to display for the item in all the sizes. In my case I have different images for small vs large. So I'd have to manually work with every item to add the different Large image after creating the item with the "default image" this being the small image.
This is very consuming and very impractical when you have many thousands of items. Just to start, I will be loading over 15K T-shirts, 4K candy items, 2-3K personalized party favors, etc...
The expanded explanation makes things a little clear (thank you) Clearly your store setup is a UNIQUE situation.
The majority of shopowners who use IH2 are using the default Zen Cart image setup/management, and use IH2 to make the work of managing product images easier. This means that they upload the large image as the default image, and let Zen Cart/IH2 take care of creating the product image thumbnails (small image) for them.
The image setup for your store is different than the "average" shopwowner. If you wanted to use IH2 so that the small medium and large images are three distinct image files, in the IH2 interface you would edit the image and upload your small/thumbnail image as your default image then upload your medium image, and then upload your large image. This the only way that IH2 will use different images for each image size.
Quote:
Originally Posted by
jmuniz
IH2 CANNOT work without the "images" directory. It's not as you put it simply a matter of IH2 uploading files in it's own directory.. The purpose of the IH2 cache directory is to help with image performance by caching the images in order to improve page load performance. To create this cache, IH2 must get the image information form the original "source" In this case it's the images directory (and it's sub-directories)
What I have seen is IH2 will use the default image and directory from the Zen item creation (I use EZ Populate for this) to create it's cached version in all the sizes. Then when the "Large" image is edited in IH2, IH2 will upload this new image into the directory images/large/original directory name/
I created an item whose default image is located in images/placecard
When I edited the large image in IH2 it uploaded the new Large image into /images/large/placecard
Is there a way to have the Large images already uploaded in the same fashion and naming convention (_LRG.) and defined to the item without manually editing each item IH2?
Again IH2 follows default Zen Cart behavior for managing large images.. As the help text on the image editing interface indicates:
Quote:
A default image must be defined. The default image is assumed to be the smallest when medium or large images are entered.
So if you explicitly upload a large image using the IH2 image editing functions it will save the image as you describe. If you do not upload a medium or large image, IH2 assumes that the default image is the large image and creates the small and medium images needed. (which is how Zen Cart's own default image management works)
Re: Image Handler 2 Support
Quote:
Originally Posted by
DivaVocals
The expanded explanation makes things a little clear (thank you) Clearly your store setup is a UNIQUE situation.
The majority of shopowners who use IH2 are using the default Zen Cart image setup/management, and use IH2 to make the work of managing product images easier. This means that they upload the large image as the default image, and let Zen Cart/IH2 take care of creating the product image thumbnails (small image) for them.
The image setup for your store is different than the "average" shopwowner. If you wanted to use IH2 so that the small medium and large images are three distinct image files, in the IH2 interface you would edit the image and upload your small/thumbnail image as your default image then upload your medium image, and then upload your large image. This the only way that IH2 will use different images for each image size.
Again IH2 follows default Zen Cart behavior for managing large images.. As the help text on the image editing interface indicates:
So if you explicitly upload a large image using the IH2 image editing functions it will save the image as you describe. If you do not upload a medium or large image, IH2 assumes that the default image is the large image and creates the small and medium images needed. (which is how Zen Cart's own default image management works)
I've been using the item's small image(not really small) as the default so that IH2 does it's regular process creating all 3 sizes.
This is fine for the small and medium inages.
Then I go back and edit the Large image by letting IH2 upload the image so all is as it should be for the item.
Can you point me to the program that creates the edited Large image or Is there a modification that I can make to automatically define the real Large image for each item in a mass update like it does when items are created/updated using EZ Populate?
Thanks!
Re: Image Handler 2 Support
Quote:
Originally Posted by
jmuniz
I've been using the item's small image(not really small) as the default so that IH2 does it's regular process creating all 3 sizes.
This is fine for the small and medium inages.
Then I go back and edit the Large image by letting IH2 upload the image so all is as it should be for the item.
Can you point me to the program that creates the edited Large image or Is there a modification that I can make to automatically define the real Large image for each item in a mass update like it does when items are created/updated using EZ Populate?
Thanks!
I have not looked at the code in depth to know all the places in IH2 you will need to modify to make it work the way you want. I do suspect that it will require somewhat of a hefty re-write to nearly all of the function and store files in IH2 to achieve the functionality you are trying to accomplish. I wish I could provide more information than that..:unsure:
IH2 in general is designed to ease the manual processes involved with creating optimized images for shopowners by taking the large product image and creating all the required optimized images needed.
In short it does a LOT of the heavy lifting for shopowners. IH2's functionality is the equivalent to the manual process described in this Zen Cart FAQ:
https://www.zen-cart.com/tutorials/i...hp?article=224