compression - Mass image optimization server side to Google Page speeds standards? -


i compressed images gd library , size 1/3 of original size google page speed showing me can still optimize images. have lot of images on server , downloading them , uploading them take eternity, best if possible through script or api ?

i researched little , found question:

google page speed-like image optimization

but smush api seems down , can't install mod_pagespeed because i'm running site on shared hosting service.

do have recommendations optimize images google pagespeed satisfied ?

you can use tools such optipng, deflopt, jpegoptim etc. of these command line tools dedicated compressing various image formats.

depending on whether want static assets or dynamically uploaded content, there 2 ways integrate them web page.

  1. if use static assets (such company logo, icons etc.), optimize them manually - or if use deploy script such grunt.js, check out if there modules can automatically when run script.

  2. if want optimize dynamic content, need able invoke these tools within script handles user request. when user uploads image server, script receives , move directory, call system() (or exec(), or equivalent language use), 1 of these tools , path image.

    be aware optimizing images on fly time expensive. if need deal lots of users uploading lots of images, rather embedding optimizers within upload handler, consider setting cron job runs through yet-unoptimized images once day.


Comments

Popular posts from this blog

php - Admin SDK -- get information about the group -

Python Error - TypeError: input expected at most 1 arguments, got 3 -

dns - How To Use Custom Nameserver On Free Cloudflare? -