Filters
Documentation
PageSpeed groups optimizations as filters and organizes them by the content type they
transform. Each filter performs a specific transformation on responses as they pass through
the server, and filters can be enabled individually or activated in groups via
RewriteLevel
presets (CoreFilters, OptimizeForBandwidth).
For how to enable, disable, and scope filters per location, see the ModPageSpeed 2.0 configuration guide or the 1.1 filter selection reference. The per-category pages below cover the full directive reference shared by both products.
Image filters
Recompression, format conversion (WebP, AVIF), resizing, inlining, lazy loading, and responsive images. The master filter rewrite_images is a CoreFilter and enables several sub-filters by default.
CSS filters
Minification, combining, inlining, import flattening, and critical CSS extraction. Several CSS filters are CoreFilters and run by default; the rest can be enabled individually or via OptimizeForBandwidth.
JavaScript filters
Minification, combining, inlining, deferring execution, and source map preservation. Three JS filters are CoreFilters: rewrite_javascript, combine_javascript, and inline_javascript.
HTML filters
Whitespace removal, comment stripping, attribute elision, DNS prefetch, and resource preloading. Two HTML filters (add_head, convert_meta_tags) are CoreFilters and run by default.
Caching & URL filters
Cache extension and URL management. The extend_cache filter rewrites resource URLs so browsers cache them aggressively while still receiving updated content when resources change.