Skip to content

Migrating from LiipImagineBundle

Progressive Image Bundle isn't a drop-in replacement API-wise, but every workflow you rely on with Liip has a direct equivalent. This page maps the two side by side.

URL generation

LiipPGINotes
imagine_filter(path, filter)pgi_filter(path, filterSetName)Both are plain Twig functions returning a URL string — usable in an img src, og:image, JSON, sitemaps, emails. See Generating a URL without the component.
an img tag built around imagine_filter(...)the pgi:Image componentFor content inside a page template, prefer the component — it also gives you the placeholder, picture/srcset, and zero-CLS sizing for free.

On-the-fly HTTP resolution

LiipPGI
/media/cache/resolve/<filter>/<path>/media/pgi/resolve/{filterSet}/{path}

Same shape, same purpose: hit it with a GET, it generates the variant synchronously if needed and redirects to the result. See On-the-Fly Resolve Route.

CLI cache management

LiipPGI
liip:imagine:cache:resolveprogressive-image:variant:warm
liip:imagine:cache:removeprogressive-image:variant:remove

See CLI Commands.

Filter mapping

Filters are configured under filter_sets instead of Liip's filter_sets key of the same name — the config shape is close enough that most entries only need their filter names translated:

Liip filterPGI filterNotes
thumbnailthumbnailSame mode: inset|outbound semantics.
cropcropSame size/start shape.
upscale(none — built in)PGI never enlarges past the original; there's nothing to configure.
relative_resizerelative_resizePGI's variant works in percentages (width_percent/height_percent) rather than Liip's absolute widen/heighten/increase — check Filters, Formats & Quality.
rotaterotateSame.
auto_rotateauto_rotateSame — reads EXIF orientation, then discards the tag.
backgroundbackgroundSame.
watermarkwatermarkSame.
pastepasteSame.
grayscalegrayscaleSame.
negativenegativeSame.
interlaceformats.progressive: trueNot a filter — a formats (or per-filter-set/context progressive) flag: progressive-scan JPEG or Adam7-interlaced PNG. See Filters, Formats & Quality.
stripformats.strip_metadata: trueSame shape as progressive — a formats (or per-filter-set/context strip_metadata) flag, not a filter. JPEG/WebP/AVIF only.

Full filter reference, including options: Filters, Formats & Quality.

Loaders

PGI resolves local sources from filesystem, asset_mapper, or a chain of the two (progressive_image.resolvers). For sources living on S3 or behind a remote URL, enable variant_source.http — see Remote (HTTP) Source Loading — which lets a SourcePath be an absolute http(s):// URL instead of a local path.

Released under the MIT License.