Live gallery
Optimization examples
Every optimization mod_pagespeed 1.1 performs, shown live. Each of these 47 examples is a small page served by mod_pagespeed 1.1 — the self-hosted module for Apache, nginx, IIS, and Envoy. Open one to see the original and the optimized output side by side, read exactly what changed in the source, and see the bytes and requests it saved.
These are mod_pagespeed 1.1 filters.
1.1 is the self-hosted module for Apache, nginx, IIS, and Envoy, where you switch each optimization on and off individually — so this gallery shows them one filter at a time. ModPageSpeed 2.0 takes a different path: one always-on pipeline with no per-filter switches, nothing to tune and nothing to break. Same optimization libraries underneath, a different control model — on 2.0, read these as what the pipeline does, not a list of toggles.
Read the 1.1 docs · See ModPageSpeed 2.0 optimize a whole site
Served live from demo-httpd-1.1.modpagespeed.com. These
revive the classic open-source mod_pagespeed example showcase; mod_pagespeed was originally
developed at Google, and examples that name Google services (Analytics, AdSense, Fonts)
interoperate with them but imply no affiliation.
Measured May 27, 2026
.
Images
Recompress, resize, inline, sprite, and lazy-load images — usually the largest win.
-
Optimize images
−94% bytesRecompresses images, resizes them to their display size, and inlines small ones.
rewrite_images -
Responsive images
Serves a srcset so each device downloads an image sized for its screen.
responsive_images -
Resize images for mobile
Serves smaller low-quality placeholders to mobile browsers, then the full image.
resize_mobile_images -
Resize to rendered dimensions
−46% bytesResizes an image to the dimensions it is actually rendered at on the page.
resize_rendered_image_dimensions -
Inline preview images
Shows an inlined low-quality placeholder until the full image loads.
inline_preview_images -
Lazy-load images
Defers off-screen images until they scroll into the viewport.
lazyload_images -
Sprite images
Combines background images referenced in CSS into a single sprite.
sprite_images -
Deduplicate inlined images
−8% HTMLReplaces repeated inlined images with a reference to the first copy.
dedup_inlined_images
CSS
Minify, combine, inline, and reorder stylesheets to cut requests and unblock rendering.
-
Minify CSS
−18% bytesStrips whitespace and comments, then rewrites CSS to the smallest equivalent form.
rewrite_css -
Combine CSS
−3 requestsCombines multiple stylesheet files into one to cut HTTP requests.
combine_css -
Inline CSS
−3 requestsInlines small external stylesheets to remove a render-blocking request.
inline_css -
Outline CSS
−91% HTMLMoves large inline <style> blocks into external files so they can be cached.
outline_css -
Move CSS to head
Moves stylesheets into the <head> so the browser finds them sooner.
move_css_to_head -
Move CSS above scripts
Reorders CSS ahead of scripts so styles are not blocked by JavaScript.
move_css_above_scripts -
Flatten CSS @imports
Replaces @import rules with the imported CSS to avoid chained requests.
flatten_css_imports -
Convert @import to link
Rewrites a <style> that only @imports into an equivalent <link>.
inline_import_to_link -
Inline Google Fonts CSS
−1 requestInlines the small font-loading CSS that the Google Fonts API serves.
inline_google_font_css -
Fallback CSS URL rewriting
Rewrites URLs inside CSS even when the stylesheet cannot be fully parsed.
fallback_rewrite_css_urls -
Prioritize critical CSS
Inlines above-the-fold CSS and loads the rest after first paint.
prioritize_critical_css -
Rewrite style attributes
Applies CSS rewriting to inline style="" attributes.
rewrite_style_attributes -
Rewrite style attributes with url()
Rewrites inline style attributes only when they contain a url() reference.
rewrite_style_attributes_with_url -
Cache-extend images in CSS
Rewrites image URLs inside CSS to content-hashed, cacheable URLs.
rewrite_css_extend_cache -
Recompress images in CSS
Recompresses images referenced from inside stylesheets.
rewrite_css_rewrite_images
JavaScript
Minify, combine, inline, and defer scripts to send fewer bytes and unblock rendering.
-
Minify JavaScript
−26% bytesStrips comments and whitespace from JavaScript.
rewrite_javascript -
Combine JavaScript
−1 requestCombines multiple script files into one to cut HTTP requests.
combine_javascript -
Inline JavaScript
−1 requestInlines small external scripts to remove a request.
inline_javascript -
Outline JavaScript
−99% HTMLMoves large inline <script> blocks into external files so they can be cached.
outline_javascript -
Defer JavaScript
Defers script execution until the page has loaded.
defer_javascript -
Canonicalize JS libraries
Redirects well-known library files to a shared, canonical, cacheable URL.
canonicalize_javascript_libraries -
Async Google Analytics
Rewrites a synchronous Google Analytics snippet to load asynchronously.
make_google_analytics_async -
Async AdSense
−9% HTMLRewrites synchronous Google AdSense tags to the asynchronous format.
make_show_ads_async
HTML
Trim the markup itself — whitespace, comments, redundant attributes and quotes.
-
Collapse whitespace
−15% bytesRemoves redundant whitespace from the HTML.
collapse_whitespace -
Remove comments
−36% bytesStrips HTML comments from the markup.
remove_comments -
Remove quotes
−4% HTMLRemoves quotes around HTML attribute values where they are not required.
remove_quotes -
Elide attributes
−6% bytesRemoves attributes whose value is the browser default.
elide_attributes -
Combine heads
−6% HTMLMerges multiple <head> elements into one.
combine_heads -
Pedantic
Adds default type attributes to script and style tags that omit them.
pedantic -
Insert Google Analytics
Injects a Google Analytics snippet from a configured account id.
insert_ga -
Add instrumentation
Adds a small client-side beacon that reports real load timings.
add_instrumentation
Caching
Make resources cacheable forever with content-hashed URLs.
-
Extend cache
Rewrites resource URLs to content-hashed names so they cache for a year.
extend_cache -
Extend cache (PDFs)
Applies cache extension to linked PDF files.
extend_cache_pdfs -
Local storage cache
−1 requestStores inlined CSS and images in the browser's local storage for repeat visits.
local_storage_cache -
Optimize for bandwidth
−59% bytesOptimizes resources in place without changing their URLs — safe for any cache.
optimize_for_bandwidth
Resources
Resource hints and URL rewriting that start fetches earlier and cut round-trips.
-
Insert DNS prefetch
Injects <link rel="dns-prefetch"> hints so the browser resolves DNS early.
insert_dns_prefetch -
Preload subresources
Emits preload hints for CSS and JavaScript the page will need.
hint_preload_subresources -
Trim URLs
−16% HTMLShortens resource URLs to relative form where it is safe to do so.
trim_urls -
Proxy external resources
Proxies and optimizes trusted resources hosted on domains without PageSpeed.
map_proxy_domain