Author Topic: Optimized images categories  (Read 344 times)

lgiulio

  • Beginner
  • *
  • Posts: 35
  • A beginner
Optimized images categories
« 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

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 7596
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.2
Re: Optimized images categories
« Reply #1 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
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26357
  • Always on vacation
    • Jenkin Hill Internet
Re: Optimized images categories
« Reply #2 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.


Kelvyn

Jenkin Hill Internet,
Keswick, Lake District

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM3.2.4 on Joomla 3.8.1 PHP 7.0.23

Testing VM3.2.5 on J!3.8.1

Ghost

  • Jr. Member
  • **
  • Posts: 367
Re: Optimized images categories
« Reply #3 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.

Studio 42

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2333
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Optimized images categories
« Reply #4 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.