bn17311:
i think niccols idea is better, resize the large images on upload rather than enforce the Maximum File Upload Size,
bnYou've missed my point.. Niccol can still code her application do scaling on upload for the large images based on an admin configurable setting if she wishes.. (this is afterall what we were speaking of..) However, my point is that this can be done while retaining the original image. If I understand how the Image Scaler works currently, scaling on upload for ONLY the large images is different than the way the scaled small and medium images are currently generated. (I believe small and medium images are scaled "on demand" when the product page is accessed).
What niccol seems to be leaning towards is scaling the large image on upload and REPLACING the original image with this scaled large image. The question is whether it's a good idea to replace the ORIGINAL uploaded image or REPLACE it with the scaled large image.. Right now Image Scaler doesn't appear to do ANYTHING with the original images when creating the small and medium scaled images.
Her concern seems to be referring to a shopowner uploading an image which may have been too large to begin with being stored in the images folder (if the originals are left in place) even if only the scaled small, medium, and large images are what is served up on the various product and category pages.
I was pointing out that Zen Cart already has BUILT IN functions to deal with this precise situation. It adds some level of insurance that overly large images are not uploaded to the site to begin with. It would NOT be a good idea to "code around" the built in functionality. Better to work WITH built in functionality.. (Hence the reason she modified Image Scaler to now support null or "0" values in the image size settings.. It now works WITH built in Zen Cart functionality)
I personally do not think it's a good idea to "remove" the original image (which scaling on upload for large images will in effect do). Better to generate scaled images based on admin settings and leave the original image alone.
I understand niccols concern, but I think the built in Zen Cart functionality to prevent overly gigantic images from being uploaded to begin with is sufficient protection from foolish behavior. It gives shopowners GREATER flexibility, not LESS if their original images are retained. I say this from experience.. One frequently asked question in the IH3 support thread is surrounding concerns that the original images are not lost in the compression and re-sizing routines..
Plus as niccol pointed out earlier in this thread, disk space is cheap.. So what's the REAL concern/harm with leaving the original image in place and simply generating a scaled large image based on admin settings when the page is accessed in the SAME manner that small and medium images are currently generated??
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.