Skip to content

pagespeed: PageSpeed dynamic module for NGINX

Debian/Ubuntu installation

These docs apply to the APT package nginx-module-pagespeed provided by the GetPageSpeed Extras repository.

  1. Configure the APT repository as described in APT repository setup.
  2. Install the module:
sudo apt-get update
sudo apt-get install nginx-module-pagespeed
Show suites and architectures
| Distro   | Suite             | Component   | Architectures   |
|----------|-------------------|-------------|-----------------|
| debian   | bookworm          | main        | amd64           |
| debian   | bookworm-mainline | main        | amd64           |
| debian   | trixie            | main        | amd64           |
| debian   | trixie-mainline   | main        | amd64           |
| ubuntu   | focal             | main        | amd64           |
| ubuntu   | focal-mainline    | main        | amd64           |
| ubuntu   | jammy             | main        | amd64           |
| ubuntu   | jammy-mainline    | main        | amd64           |
| ubuntu   | noble             | main        | amd64           |
| ubuntu   | noble-mainline    | main        | amd64           |

ngx_pagespeed speeds up your site and reduces page load time by automatically applying web performance best practices to pages and associated assets (CSS, JavaScript, images) without requiring you to modify your existing content or workflow. Features include:

  • Image optimization: stripping meta-data, dynamic resizing, recompression
  • CSS & JavaScript minification, concatenation, inlining, and outlining
  • Small resource inlining
  • Deferring image and JavaScript loading
  • HTML rewriting
  • Cache lifetime extension
  • and more

To see ngx_pagespeed in action, with example pages for each of the optimizations, see our demonstration site.

How to use

Follow the steps on PageSpeed configuration.

For feedback, questions, and to follow the progress of the project: