disabling mod_pagespeed for a single specific GIF

292 views
Skip to first unread message

sa...@shirts-n-giggles.com

unread,
Oct 11, 2017, 2:41:53 PM10/11/17
to mod-pagespeed-discuss
I'm having a problem with a specific GIF file - just one.  Its delivered as part of a plugin, so I have no control over the HTML.

is there any way to disable pagespeed just for that one file in configuration without impacting the remainder of the optimizations?

My optimization set is:

ModPageSpeed on
ModPagespeedRewriteLevel CoreFilters
ModPagespeedEnableFilters prioritize_critical_css
ModPagespeedEnableFilters sprite_images
ModPagespeedEnableFilters collapse_whitespace,remove_comments
ModPagespeedEnableFilters local_storage_cache
ModPagespeedEnableFilters inline_images
ModPagespeedEnableFilters resize_images
ModPagespeedEnableFilters combine_javascript,rewrite_javascript
ModPagespeedEnableFilters rewrite_javascript_inline
ModPagespeedEnableFilters move_css_to_head
ModPagespeedEnableFilters inline_javascript
ModPagespeedEnableFilters responsive_images,resize_images
ModPagespeedEnableFilters responsive_images_zoom
ModPagespeedEnableFilters make_google_analytics_async
ModPagespeedEnableFilters make_show_ads_async
ModPagespeedEnableFilters remove_comments
ModPagespeedEnableFilters collapse_whitespace
ModPagespeedEnableFilters insert_dns_prefetch
ModPagespeedEnableFilters dedup_inlined_images
ModPagespeedEnableFilters lazyload_images
ModPagespeedRateLimitBackgroundFetches off
ModPagespeedEnableFilters canonicalize_javascript_libraries
ModPagespeedEnableFilters flatten_css_imports
ModPagespeedEnableFilters inline_google_font_css
ModPagespeedFetchHttps enable
ModPagespeedJsInlineMaxBytes 40960
ModPagespeedCssInlineMaxBytes 40960

and I get an element:

<img src="data:image/gif;base64,R0lGODlhEAAQAPUAAP......==" data-pagespeed-responsive-temp="non-inlinable-virtual" width="48" height="48" data-pagespeed-url-hash="1888006222" onload="pagespeed.CriticalImages.checkImageForCriticality(this);">

however, this is one of those files which contains multiple images (further complicating, they're different sizes) and it's an animated GIF.  When the page is displayed, the full image is displayed, rather than just the single element.

Kicker is - it doesnt show like that all the time.  My guess is the cache expires, and the original image gets sent every once in a while.

I'd like to be able to tell pagespeed to just NOT try and optimize this one image....

Otto van der Schaaf

unread,
Oct 11, 2017, 3:36:49 PM10/11/17
to mod-pagespeed-discuss
If the troublesome image is served as a url originally (without mod_pagespeed inlining it), then one option you have is configuring ModPagespeedDisallow to exclude it:

Otto


--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/17d97a2c-5bc2-4076-aff7-a9345ab9f998%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

sa...@shirts-n-giggles.com

unread,
Oct 11, 2017, 5:52:49 PM10/11/17
to mod-pagespeed-discuss
Thank you! worked like a charm.

Hard to find that on the docs site... 
Reply all
Reply to author
Forward
0 new messages