Site Slow on Loading .png pictures Opencart

Please LogIn to Reply!

Post By: guest | 01-23-2013 07:57 Reply

Question

Can someone help me out on this? Im using oc 1.5.1.3 and whenever I set a .png photo for a product, the website takes for ever to load that picture. But if I use a .jpg photo all is well. Any tips would be great.

Regards

Answers

OpenCart doesn't handle PNG thumbnails correctly (in the sense that the picture doesn't get smaller), don't use pngs

Its a shame Wanted to give my website a make over and pngs would be the perfect pictures (transparent background of pictures)

The png "does" get smaller. Sometimes compression is happening and you don't know it because you need to clean your image/cache. Clear that out and you will see the size go down dramatically. Use all the PNG's you want. If you look at the image function all formats run through prior to being (saved) it deals with PNG's a little different but they both undergo the same compression.

New Guy wrote:The png "does" get smaller. Sometimes compression is happening and you don't know it because you need to clean your image/cache. Clear that out and you will see the size go down dramatically. Use all the PNG's you want. If you look at the image function all formats run through prior to being (saved) it deals with PNG's a little different but they both undergo the same compression.


Hi

So basically I should clear out my cache and all should be well?

No, he is not correct. You should listen to Tcalp and his suggestion. Here is some commerce 101:
For product, category, banner, or images uploaded with the image manager unless the background that you are displaying your products on is "textured" which means it's a gradient or "not" a solid color + you are using a drop shadow effect on the image itself , don't use PNG's. Use a JPEG that has the same background color as your container background. The default compression quality you are looking at is 90.

Code: Select all
 public function save($file, $quality = 90) {


What does this mean? This means that if you upload a PNG that is 48 KB's it will compress at 85 KB. Yes, you could screw with the compression but don't bother. Use Jpeg for these images.

If you do use PNG's, use them in the main structure of the website with your CSS so they will bypass the Open Cart image save function. Those images are stored in: catalog/view/theme/your_theme/image/

avvici wrote:No, he is not correct. You should listen to Tcalp and his suggestion.


It's a fantastic feeling to be RIGHT

a vvici wrote:...If you do use PNG's, use them in the main structure of the website with your CSS so they will bypass the Open Cart image save function. Those images are stored in: catalog/view/theme/your_theme/image/


What if I should upload the png to that folder with Filezilla, would it be ok?

speedy wrote:
a vvici wrote:...If you do use PNG's, use them in the main structure of the website with your CSS so they will bypass the Open Cart image save function. Those images are stored in: catalog/view/theme/your_theme/image/


What if I should upload the png to that folder with Filezilla, would it be ok?


You STILL need to use JPEG. Just follow these directions to trim the white away from your images. It scales down to a max height and max width.
viewtopic.php?f=20&t=63105&hilit=+crop

Tags:

loading png

opencart png

opencart png compression

Reply Or Comment!
Please LogIn to Reply!