symfony / ux-keycdn-image
Symfony UX Image KeyCDN Bridge
Package info
github.com/symfony/ux-keycdn-image
Type:symfony-ux-image-bridge
pkg:composer/symfony/ux-keycdn-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-09-28 06:20:34 UTC
README
EXPERIMENTAL This component is currently experimental and is likely to change, or even change drastically.
KeyCDN Image Processing integration for Symfony UX Image, through query string parameters appended to your zone's URL. Use this bridge to transform images already served from your own origin ("bring your own storage") behind a KeyCDN zone, without running any image-processing server yourself.
Installation
Install the bridge using Composer and Symfony Flex:
composer require symfony/ux-keycdn-image
DSN example
UX_IMAGE_DSN=keycdn://myzone.kxcdn.com
The host is your KeyCDN zone.
Parameter mapping
ImageTransformation properties are mapped to KeyCDN's image processing query parameters:
ImageTransformation |
KeyCDN parameter | Notes |
|---|---|---|
width |
width |
|
height |
height |
|
fit: Fit::Cover |
fit=cover |
|
fit: Fit::Contain |
fit=contain |
|
format |
format |
|
quality |
quality |
|
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:
position, enlarge, trim, crop, bg, rotate, flip, flop, sharpen, blur, gamma, grayscale, progressive, lossless, metadata.
See the full parameter reference for what each one does.
Supported formats
webp, jpeg, png.
Unlike Cloudflare, KeyCDN has no format=auto equivalent: there is no automatic format negotiation, and AVIF is not among the formats it can encode to. ux_image() renders its <img> in the last configured format KeyCDN supports; use ux_picture() to render one <source type> per configured format.