4

according to the recommendations of page speed, how i can compress images to upload in my account in google cloud storage to server fast to my wordpress blog?

Thanks for you support.

  • Can you explain a bit more about what you're trying to achieve? Do you want to serve some existing images with gzip encoding enabled? Or do you want to reduce the size of some big images? Whose recommendation are we talking about? – Brandon Yarbrough Oct 07 '13 at 21:49

1 Answers1

2

Try below command, you can select image format like png, jpg etc also set cache expiry for 7 days which will save your bandwidth and billing charges

gsutil -h "Cache-Control:public, max-age=604800" cp -z png /images/* gs://backetname/images
or
gsutil -h "Cache-Control:public, max-age=604800" cp -z png /images/logo.png gs://backetname/images
Hrishi
  • 169
  • 3
  • 10
  • 2
    I suggest you measure the size savings when running "gzip ". It's not clear that you'll save space by compressing images, and in fact you may get negative compression depending on the image format. – Mike Schwartz Oct 08 '13 at 21:22
  • Hello, thanks for you support, but the metadata of images in Cloud Storage are fine as expiration cache, gzip encoding, etc, just need to compress the images to reduce the size of the images, – Mauricio Macas Ochoa Oct 09 '13 at 17:36
  • Dear friend above command will compress images, or any static files like css, js etc. I am using this for my client, couldn't mention here live example. I found reduction in images 10 to 40% and js or css more than 50%. You can use this gsutil tool from any desktop no need for server. One addition: just add `must-revalidate` in above command `Cache-Control:public, max-age=604800, must-revalidate` – Hrishi Oct 09 '13 at 20:47