I've been searching and trying to figure out why I can't get png image compression to work for an opencart 1.5 site I'm working on.
On line 46 of library/image.php I modified the imagepng function to use compression 9 instead of the default 0 and it had no affect on my images. I deleted the images from the fileserver and they just repopulate with the exact same file size/quality.
Anyone know how I can get the file sizes of my images down? A 1000x750px image is over 2M and it's killing my load times.
Thank!
Thanks for the quick reply!
I've completely cleared the image/cache folder and the images repopulate with the same byte-for-byte size whether I have the compression in the imagepng function on line 46 set to 0 or 9. I've actually commented out the imagepng function on line 46 and the images are still repopulated after clearing the image cache.
I can't seem to figure out what is generating the images (although I think its the resize() function on line 54 - 92) and how I might apply compression since there's no imagepng call in that function.
Does anyone have any ideas on how I might be able to get png image compression working for these images?
Thanks!
I've completely cleared the image/cache folder and the images repopulate with the same byte-for-byte size whether I have the compression in the imagepng function on line 46 set to 0 or 9. I've actually commented out the imagepng function on line 46 and the images are still repopulated after clearing the image cache.
I can't seem to figure out what is generating the images (although I think its the resize() function on line 54 - 92) and how I might apply compression since there's no imagepng call in that function.
Does anyone have any ideas on how I might be able to get png image compression working for these images?
Thanks!
Then the first thing to do is make sure you're overwriting the file properly because disabled functions don't run.jdehlin wrote:I've actually commented out the imagepng function on line 46 and the images are still repopulated after clearing the image cache.
-Ryan
You can easily increase your site speed by compressing images with the following extension.
http://www.opencart.com/index.php?route ... n_id=18138
It's enables you to compress all the existing images on your site and then automatically optimises any that you upload afterwards.
http://www.opencart.com/index.php?route ... n_id=18138
It's enables you to compress all the existing images on your site and then automatically optimises any that you upload afterwards.
Who is online
Users browsing this forum: No registered users and 179 guests