2

I have a Blogger site where some companies post product and services offers. They submit the articles themselves via a PHP web-form which e-mail posts the articles to the blog.

Images are also attached and they are posted to the blog but not optimized.

How can I display optimized images on the blog?

I am displaying the images using this code:

<img class='offer-image hidden' expr:src='resizeImage(data:post.thumbnailUrl, 600)'/>

However the images are not optimized.

The address of the blog si: http://www.best-offers.ro/

This is the result i get when analyzing the page:

enter image description here

T-Heron
  • 5,385
  • 7
  • 26
  • 52
TudorAnghelina
  • 153
  • 1
  • 1
  • 7
  • Start reading [this related question](http://stackoverflow.com/questions/5451597/how-does-googles-page-speed-lossless-image-compression-work). – sascha Jan 15 '17 at 03:23
  • Hi @T-Heron. I understand the issue much better at this point, however I still have no solution for optimizing the images dynamically. As i told you before the users submit the "blog-posts" via a jQuery-PHP Ajax web form and there is no way for me to controls the image compression rate. Do you know if I can somehow compress the images before sending them to PHP mail? – TudorAnghelina Jan 15 '17 at 12:45
  • @TudorAnghelina You can run the images through image compression API before sending them to PHP mail. Few services like Tinypng , ShortPixel and ReSmush provide this service for free (with some limits) – Prayag Verma Feb 03 '17 at 09:56

0 Answers0