Original image bart-had-a-groove.gif size is 753.43 KB.

Processed image bart-had-a-groove.gif.pagespeed.ce.gB3ARqAHA8.gif size is still 753.43 KB.

Mods used:

  pagespeed DisableRewriteOnNoTransform off;

  pagespeed EnableFilters rewrite_images;
  pagespeed EnableFilters sprite_images;
  pagespeed EnableFilters insert_image_dimensions;
  pagespeed EnableFilters resize_images;
  pagespeed EnableFilters resize_rendered_image_dimensions;
  pagespeed EnableFilters rewrite_images;
  pagespeed EnableFilters strip_image_color_profile;
  pagespeed EnableFilters strip_image_meta_data;

The file gets renamed and headers contain the pagespeed, so pagespeed is working.

Could it be that the original image was already compressed to the max or something?

  • 1
    I wouldn't expect it to make any difference, but you appear to have the rewrite_images filter twice? Shouldn't the rewrite_images filter also convert GIF to PNG? – MrWhite Dec 5 '18 at 16:24
  • 1
    @MrWhite Thanks for noticing. My GIF is animated and contains more than one frame, and documentation states I should use convert_to_webp_animated at modpagespeed.com/doc/reference-image-optimize instead. I added the line, but I still get the .gif output. – user3108268 Dec 5 '18 at 16:57
  • @user3108268 have you flushed the cache, restarted apache and service memcached? since, you will need to since those previous rules and results are now cached. – Simon Hayter Dec 5 '18 at 20:14
  • @SimonHayter I did. Anyway, I came up with the solution going with MP4. Smallest size and more supported by majority browsers than webm or webp according to caniuse.com. Just use ffmpeg to do convert from gif to mp4. – user3108268 Dec 6 '18 at 11:08
  • Can it be, that your original image has already its minimal possible size? What about other images? – Evgeniy Dec 11 '18 at 10:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.