VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: lgiulio on April 27, 2017, 10:01:35 AM

Title: Optimized images categories
Post by: lgiulio on April 27, 2017, 10:01:35 AM
PHP : 7.0.18
joomla : 3.6.5
Virtuemart: 3.2.1

Hello,


I have a problem with image optimizations.

I've optimized it to the maximum in png using all available online services.

Using the pagespeed  tools or gtmetrix , my desktop always suggests optimizing.

Did anyone have the same problem?

My site is www.passionepuglia.it

Thank you
Title: Re: Optimized images categories
Post by: GJC Web Design on April 27, 2017, 10:24:25 AM
This has nothing to do with Virtuemart

Photoshop (other equivalent products are available) will do a far better job than any freebie software
Having said that Gspeed sometimes has unrealistic expectations for image sizes.. how could it accurately judge?

Is png anyway the right format for your images?  Normally for photographic images jpg is used
Title: Re: Optimized images categories
Post by: jenkinhill on April 27, 2017, 11:56:56 AM
Good advice from GJC
I just took one of your category product png images, file size 69Kb and converted it to jpg in Photoshop, and now it is 5Kb.  Top image is png, bottom, jpg.

(https://image.ibb.co/eUp2d5/capers_with_stem_300x500.png) (https://ibb.co/iLJvy5)
(https://image.ibb.co/kOz2d5/capers_with_stem_300x500.jpg) (https://ibb.co/mm8vy5)
Title: Re: Optimized images categories
Post by: Ghost on April 27, 2017, 14:17:44 PM
You shouldn't use PNG unless you have transparent images. JPG is much smaller. Your resized (by VM) category images are larger (by dimensions) than your original images. Maybe disable resizing here and use original images instead.

If you know PHP, you can try hacking Img2Thumb class of VM. Maybe possible to implement compression here.
Title: Re: Optimized images categories
Post by: Studio 42 on April 27, 2017, 17:42:59 PM
Some tool are simple dumb.
Your google pagespeed result is right.
But i think that in real this is not optimized, because jchoptimize add new file for each page. So if display 100 page, each time the javascript is loaded again.
At end you have a good pagespeed, but a slow loading(because cache is not used for all page).
In my case for your understand.
Pageloading is 1600 ms when you enter the site.
2nd page load is 600ms. Because my site can reload same javascript again.
In your case on each page change loading time is 2000ms and reload javascript.
So what is an optimised page (and not a right pagespeed page) ?
A page that can reuse same code again and again, because this get loaded from browser cache and not from your website.
So stop to check with all tools as GTmetrix or pagespeed, this tool have no logic.
Eg. google check image size but only for 2 case : desktop and mobile at a certain size.
So optimizing image is not really right or you defer all image load using a javscript.
If you defer image loading your customer have to wait for this image and is not optimised for users.
I can give you other examples, but on testing on different tools, you get different result, because they use different algorithm.