symfony / ux-imgix-image
Symfony UX Image imgix Bridge
Package info
github.com/symfony/ux-imgix-image
Type:symfony-ux-image-bridge
pkg:composer/symfony/ux-imgix-image
Requires
- php: >=8.4
- symfony/ux-image: ^3.6
Requires (Dev)
- phpunit/phpunit: ^12.0
- spatie/phpunit-snapshot-assertions: ^5.2.3
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-12 05:09:20 UTC
README
EXPERIMENTAL This component is currently experimental and is likely to change, or even change drastically.
imgix integration for Symfony UX Image, through query string parameters appended to your source's URL.
Installation
Install the bridge using Composer and Symfony Flex:
composer require symfony/ux-imgix-image
DSN example
UX_IMAGE_DSN=imgix://my-source.imgix.net
The host is the domain of your imgix source, either its imgix.net subdomain or a custom domain. With a Web Folder source pointing at your origin, src stays the path your application serves the image from. With a storage source, like Amazon S3, src is the path of the image in the bucket.
Secure URLs
A source can require every URL to be signed, with secure URLs. Give the source's token as the sign_key DSN option:
UX_IMAGE_DSN=imgix://my-source.imgix.net?sign_key=the-token
Every generated URL then carries the matching s parameter, hashed over the path and the query string.
Warning
The token signs every URL: anyone holding it can request any transformation of any image of the source. Keep it out of the files you commit, and store it the way you store your other secrets.
Parameter mapping
ImageTransformation properties are mapped to imgix's rendering API parameters:
ImageTransformation |
imgix parameter | Notes |
|---|---|---|
width |
w |
|
height |
h |
|
fit: Fit::Cover |
fit=crop |
|
fit: Fit::Contain |
fit=clip |
|
format |
fm |
format: 'auto' becomes auto=format, imgix picks AVIF or WebP |
quality |
q |
|
operations |
(as given) | merged in verbatim, see below |
Supported operations
Any of the following keys can be passed through ImageTransformation::$operations and are forwarded as-is as query parameters:
auto, bg, blur, border, bri, con, crop, dpr, exp, fill, fill-color, flip, fp-x, fp-y, fp-z, gam, high, invert, monochrome, orient, pad, rect, rot, sat, sepia, shad, sharp, trim, usm, vib.
An auto operation, like compress, is joined to the auto=format of automatic format negotiation. See the rendering API reference for what each one does.
Supported formats
avif, webp, jpeg, png.