Post by joaodias117 » Tue Aug 04, 2020 3:21 am

Hello everyone,

I'm trying to optimize my site based on https://developers.google.com/speed/pagespeed/insights/ and it shows that the same image has different sizes in mobile and desktop (ex: mobile - 140KiB / desktop - 80KiB).

I already have changed the PNG images by optmized PNG and altered image.php

Code: Select all

public function save($file, $quality = 70)
but it just had impact on desktop performance.

Every help is welcome, thanks in advance.

Obs:. Journal 3.0.46 and MarketPlace 4.1.2.0 by Webkul

Newbie

Posts

Joined
Sat Apr 27, 2019 2:53 am

Post by IP_CAM » Tue Aug 04, 2020 5:37 am

You might find (free) help here, when it comes to Journal-specific matters: ;)
https://www.facebook.com/groups/192229314684939/

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by letxobnav » Tue Aug 04, 2020 8:31 am

several things determine the ultimate file size of images:
1) the actual image dimensions
2) the quality
3) the color composition
4) the encoding used

so for mobiles:
1) reduce the dimensions (pixels) to what mobiles can reasonably display.
2) No need to adjust the quality specifically for mobile
3) You have no control over color
4) you could use webp but as that would encode webp over jpg which could actually increase the filesize when certain jpg vs webp quality is used.

Always clear browser cache when altering static assets.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by paulfeakins » Tue Aug 04, 2020 6:25 pm

joaodias117 wrote:
Tue Aug 04, 2020 3:21 am
I'm trying to optimize my site based on https://developers.google.com/speed/pagespeed/insights/ and it shows that the same image has different sizes in mobile and desktop (ex: mobile - 140KiB / desktop - 80KiB).
It's complex, so just pay a developer such as ourselves or post a job in the Commercial Support Forum.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: No registered users and 6 guests