Skip to main content
ModPageSpeed 2.0 and mod_pagespeed 1.1 — Now available

ModPageSpeed vs Thumbor

TL;DR

Thumbor is a long-running open-source image processing server with smart cropping and a plugin ecosystem. ModPageSpeed is a self-hosted optimization pipeline that handles images plus critical CSS, JS/CSS minification, and HTML rewriting. If you specifically need Thumbor's smart-crop and face-detection features, ModPageSpeed isn't a replacement. For everything else page-optimization-related, ModPageSpeed covers more ground in one process.

At a glance

ModPageSpeed 2.0 Thumbor
Deployment Self-hosted (nginx interceptor + worker) Self-hosted (Python service)
Scope Full HTML pipeline Image processing only
Runtime C++ worker, nginx module Python (Tornado)
Platform nginx; Apache + IIS + Envoy (1.1 line) Any HTTP frontend
Pricing model Per-server subscription Open source (MIT)
Image optimization WebP, AVIF, JPEG, PNG, responsive variants JPEG, PNG, GIF, WebP; smart crop via face/feature detection
Smart cropping Aspect-driven resizing Face / focal-point detection (a Thumbor specialty)
Critical CSS injection Yes No
JS / CSS minification Yes No
HTML rewriting Yes No
Caching Cyclone cache, zero-copy mmap serving Pluggable (file, Redis, HTTP, MongoDB)
License Commercial subscription; BSL 1.1 source publication planned. See roadmap. MIT
Control over data Your servers, no third party Your servers, no third party

When to choose Thumbor

  • You need face-aware or focal-point cropping — Thumbor's smart-crop is the genuine differentiator and ModPageSpeed doesn't replicate it.
  • You're already in a Python ecosystem and want to extend the optimizer with your own filters or loaders.
  • You're processing user-uploaded images and need a long-lived URL-driven transform API.
  • You want a long-established image server with a track record across many production deployments.
  • You don't need CSS, JS, or HTML optimization — just images.

When to choose ModPageSpeed

  • You want one process handling images, CSS, JS, and HTML, the way mod_pagespeed did.
  • You're on nginx and want optimization in the response path, not as a separate transform service.
  • You care about critical CSS for LCP — Thumbor doesn't extract or inline CSS.
  • You want the format decision (WebP vs AVIF vs JPEG) made automatically from the request's Accept header rather than encoded in template URLs.
  • You're coming from mod_pagespeed and want the closest functional successor.

How they overlap

Both tools convert and resize images, both support WebP, both can be self-hosted with no third-party data path. Both are widely deployed for image optimization at production scale.

The overlap stops at images. Thumbor doesn't aim to be an HTML optimizer; ModPageSpeed doesn't aim to be a smart-crop service. Picking between them is mostly picking your scope.

Migrating from Thumbor to ModPageSpeed

Migration is reasonable if you adopted Thumbor for image format conversion and never used its smart-crop features. Keep Thumbor for focal-point cropping or face detection — ModPageSpeed doesn't replace those — and pair it with a server-layer rewriter for the rest of the HTML response.

If you do migrate:

  1. Audit your templates for hard-coded Thumbor URL patterns (/unsafe/300x200/...). ModPageSpeed rewrites image URLs at the HTML layer; many template patterns can be simplified or removed.
  2. Decide where to keep user-upload processing. ModPageSpeed handles HTML-referenced images; runtime transforms for user uploads may still belong in a dedicated image service.
  3. Configure the nginx interceptor and shared cache directory before retiring the Thumbor service. The Docker Compose walkthrough covers a working baseline.

Code & config side-by-side

Resize and convert to WebP in Thumbor (URL-based):

/unsafe/800x600/filters:format(webp)/example.com/photo.jpg

Equivalent in mod_pagespeed 1.1 (nginx config; the filter decides per-request):

pagespeed on;
pagespeed EnableFilters resize_images,convert_jpeg_to_webp;
pagespeed FileCachePath /var/cache/pagespeed;

ModPageSpeed reads the client's Accept header and serves WebP only to browsers that support it. Thumbor requires the URL to commit to the format up front (or you build content negotiation around it yourself).

Try ModPageSpeed

Format negotiation, CSS/JS minification, and critical CSS in one server-layer pipeline. Start a 14-day trial — card-at-start via FastSpring.

See also: