Post by Dabnis » Mon Aug 27, 2018 4:28 am

Hi All,
I am not sure if this happens in all versions of OC, but definitely in v3.0.2.0

I process my images via Adobe Fireworks & at times save some as 8 bit png's for reduced file size , performance etc.

I have just noticed today that OC converts these 8 bit png's from 8 bit to 32 bit. In my case changing a 98Kb image file into a 425Kb image file.

Needless to say the page load time drops dramatically with several 8 bit png images on one page.

Any help, advice, suggestions appreciated.

Thanks.
Dab

Newbie

Posts

Joined
Tue Jun 01, 2010 2:05 am

Post by MrPhil » Wed Aug 29, 2018 6:39 am

What sort of processing is being done on these images when you upload them to OC? Are they at least being resized? Maybe OC is defaulting to 32 bit image output rather than respecting the original settings. What happens if you provide your images in the final desired size (or anything else that processing changes)?

User avatar
Active Member

Posts

Joined
Wed May 10, 2017 11:52 pm

Post by Dabnis » Wed Aug 29, 2018 3:36 pm

The images in question are those being used for the Home page banner extension. They are getting resized to the pre-set banner size with .1120x450.png being added to the post processed image file name. As I said previously, I up load 8 bit png & any processing by OC results in 32 bit png.

Just reading your reply : Of the images being uploaded (2 of them) one is exact required size, other is slight larger (by about 5%), but both are affected by the issue.

As all other images on the store are jpg they are not affected by this issue.

Regards. Dab

Newbie

Posts

Joined
Tue Jun 01, 2010 2:05 am

Post by MrPhil » Wed Aug 29, 2018 8:31 pm

OK, so it sounds like even a simple upload (no resizing or other real processing) is ignoring original properties (like bpp) and imposing its own default properties. At this point, it will take someone familiar with this area to determine what's going on. My guess would be that the code would need to query the existing image properties, and use those if possible, rather than just use fixed defaults like 32bpp.

User avatar
Active Member

Posts

Joined
Wed May 10, 2017 11:52 pm

Post by Dabnis » Wed Aug 29, 2018 8:43 pm

I agree entirely, it is why I raised the topic as the SEO implications given Google's recent focus on page load speed are potentially huge.
Here's hoping that one of the core development team picks this up and implements a fix.

I am assuming that it will have something to do with whatever PHP graphics library they are using & hopefully just a change of settings!

Regards.
Dab

Newbie

Posts

Joined
Tue Jun 01, 2010 2:05 am

Post by ADD Creative » Wed Oct 10, 2018 4:30 am

If the image is the exact size for the banner it should not be resized and just copied instead. The code that does this this is below. So uploading the image with the correct size should prevent any optimisations from being lost. Check your image sizes match the size of any banners they are used in.

https://github.com/opencart/opencart/bl ... hp#L32-L38

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 71 guests