Skip to content

Progressive Image BundleResponsive images for Symfony, done right.

One Twig component turns any image into a fully responsive, Blurhash-placeholder, zero-CLS, AVIF/WebP-negotiated element — content-addressed and cached forever. No LiipImagineBundle required.

Progressive Image Bundle

Drop one Twig component into a template. Progressive Image Bundle resolves the source, works out every size your layout actually needs, generates content-addressed variants, and renders a real <picture> element with Blurhash placeholders and zero layout shift — no LiipImagineBundle required.

1
Twig tag to render
<twig:pgi:Image>, nothing else to wire up
0
layout shift
width/height reserved via CSS custom properties before load
3
ways to generate
sync, kernel.terminate, or async via Messenger
AVIF/WebP
content negotiation
served automatically, original kept as fallback

Up and running in three steps

composer require tito10047/progressive-image-bundle
# config/packages/progressive_image.yaml
progressive_image:
    resolvers:
        default:
            type: filesystem
            roots: ['%kernel.project_dir%/public']

    variant_store:
        storage: 'oneup_flysystem.variants_filesystem'
{# Fully automatic #}
<twig:pgi:Image src="{{ asset('images/hero.jpg') }}" alt="Hero" />

{# Tailwind-like responsive selectors #}
<twig:pgi:Image
    src="{{ asset('images/hero.jpg') }}"
    sizes="sm:12 md:6@landscape lg:4@square"
    alt="Responsive hero image"
/>

That's it — the bundle resolves real dimensions, computes what each breakpoint needs, and generates every variant on first request. Full walkthrough in the Getting Started guide.

Requires PHP 8.3+ and Symfony 6.4, 7.4, or 8.1+.

Coming from LiipImagineBundle?

Every workflow you rely on today has a PGI equivalent — plus the responsive, zero-CLS pipeline Liip never had.

FeatureProgressive Image BundleLiipImagineBundle
Standalone URL function (Twig)pgi_filter()imagine_filter()
On-the-fly HTTP resolve route
CLI cache warm / remove
Responsive <picture>/srcset out of the box
Blurhash placeholder + zero CLS
AVIF/WebP content negotiation
Real post-processing (jpegoptim/pngquant/cwebp/avifenc)
Content-addressed, immutable cache (no cache-busting)
Three generation strategies (sync / terminate / async)
DDD core with contract tests per extension point

Full breakdown and a filter-set migration table in the Getting Started guide.

pgi.blue

Progressive Image, on the blue channel. The bundle spends its time pushing bytes through the R, G and B planes of every image it touches — blue felt like the right home for it: clean, a little technical, no punchline required.

Running in production on mostka.sk and vsetkosada.sk.

Released under the MIT License.