Post by tjonnyc » Wed Jun 15, 2016 2:33 am

I'm trying to optimize my new site using several online tools, including WebPageTest.org.
One common thread in most reports: images could be further compressed, and Progressive JPEG is recommended.

So, questions:

1.) Is it possible to set a different compression level? If so, where & how?

2.) Is it possible to use Progressive JPEGs as the output?

3.) Is it possible to disable image caching COMPLETELY, and use pre-optimized JPGs?

Active Member

Posts

Joined
Tue Dec 21, 2010 5:05 am

Post by AlexDW » Wed Jun 15, 2016 3:11 am

1. Better if you prepared images before upload in Opencart (use Photoshop or similar software for this)
In Opencart you can set image compression value manually in file system\library\image.php

in line

Code: Select all

public function save($file, $quality = 90) {
where 90 - image compression value (by default and recommended)

2. Yes, to add Progressive JPEGs also in this file system\library\image.php

before line

Code: Select all

imagejpeg($this->image, $file, $quality);
add this

Code: Select all

imageinterlace($this->image, true);
3. Not recommended

PS: after change 1-2 need to clear images cache folder

Useful Opencart extensions


User avatar
New member

Posts

Joined
Sun Jun 05, 2016 3:32 am
Who is online

Users browsing this forum: No registered users and 16 guests