spatie/image-optimizer
Some data may be outdated — see provenance labels.
Easily optimize images using PHP observed · 2026-09-29
Health v2 · maintenance only
75/100
- Activity 82
- Release rhythm 51
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: 211
- age_days: 3397
- days_rel: 113
- days_push: 113
- n_releases_24m: 4
Adoption not part of the score
2879 stars · 225 forks observed · 2026-09-29
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A PHP library that optimizes PNG, JPG, WEBP, AVIF, SVG and GIF images by running them through a chain of installed optimization binaries like jpegoptim, pngquant, and gifsicle. It automatically detects available tools and overwrites images with smaller versions.
Use cases
- compress images in a php application
- reduce image file sizes for faster page loads
- optimize uploaded images automatically
- shrink pngs and jpgs without losing visible quality
- batch optimize images in a laravel app
- optimize webp and avif images
When to choose
- you're building in PHP and want lossless or near-lossless image compression
- you want a simple API that wraps multiple optimizer binaries
- you need to shrink images on upload or during deployment
When to avoid
- you need pure-PHP optimization without external binaries installed
- you need advanced image manipulation like resizing or cropping
- you're not working in PHP
Facets
library · maturity stable
image-processing compression developer-tools image-processing web-development performance media php cli cross-platform image-optimization php-package jpegoptim pngquant webp avif svg laravel-integration
3 sources
- readme: https://github.com/spatie/image-optimizer · fetched 2026-09-29 · 5bf395750b65
- homepage: https://freek.dev/797-easily-optimize-images-using-php-and-some-binaries · fetched 2026-08-29 · 74b45bd179e8
- site_page: https://freek.dev/about · fetched 2026-08-29 · e0ef9dccbb05
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| spatie/image-optimizer | main | 75 |
For agents
markdown · JSON · MCP: product_card(name="spatie/image-optimizer")
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem