Introduction
What does it do?
The |extension_name| extension (|extension_key|) optimizes images in TYPO3. Three operating modes activate automatically after installation:
- On-demand frontend processing. Images are converted and
resized lazily when first requested through the
/processed/URL path, so only images actually viewed by visitors are processed. - On-upload compression. Newly uploaded or replaced files
are losslessly compressed in place (via
optipng,gifsicle, orjpegoptim, whichever is installed) by an event listener, without changing the file's dimensions or format. - Bulk CLI. The
nr:image:optimizeandnr:image:analyzeconsole commands scan existing FAL storages. See Usage.
Features
- Lazy image processing. Images are optimized only when a visitor first requests them.
- Modern format support. Automatic WebP and AVIF conversion with fallback to original formats.
- Responsive images. Built-in
SourceSetViewHelperforsrcsetandsizesgeneration. - Render modes. Choose between
coverandfitresize strategies. - Width-based srcset. Optional responsive
srcsetwith configurable width variants andsizesattribute. - Fetch priority. Native
fetchpriorityattribute support for Core Web Vitals optimization. - Middleware-based processing. Lightweight frontend
middleware intercepts
/processed/requests. - Backend maintenance module. View statistics, check system requirements, and clear processed images.
- On-upload compression. Uploaded and replaced files are
losslessly compressed in place via
optipng,gifsicle, orjpegoptim. - Bulk CLI tools.
nr:image:optimizeandnr:image:analyzeprocess or report on existing FAL storages. - Powered by Intervention Image. Uses the Intervention Image library for reliable image manipulation.
Requirements
- PHP 8.2, 8.3, or 8.4.
- TYPO3 12.4.
- Intervention Image library, version 3.7.2 or 3.11.1 (installed automatically via Composer).
- Optional, for on-upload/CLI compression:
optipng,gifsicle, and/orjpegoptimon the$PATH(or pointed to via theOPTIPNG_BIN/GIFSICLE_BIN/JPEGOPTIM_BINenvironment variables). Missing binaries degrade gracefully -- that format is simply skipped.
Recommended extensions
- imageoptimizer
- Additional image optimization tooling that compresses uploaded and processed images with external binaries of your choice.