CDN Product Images
CDN images for Sylius products and taxons - mm-media-cdn URLs instead of local upload, freshly re-signed per rendering context automatically.
CDN Product Images
This documentation always describes the latest published version.
Live Demo: Try this and other plugins live — no installation, no risk: demo.markus-michalski.net
Overview
CDN Product Images lets a Sylius admin reference a product image - or a taxon (category) image - by an mm-media-cdn (MinIO + imgproxy + nginx-cache) URL instead of only uploading a file, while still getting a freshly, correctly resized image for every rendering context (product thumbnail, large image, admin preview, ...) instead of one fixed size shown everywhere.
Privacy/architecture: the plugin never holds its own raw imgproxy secret - only a bearer token scoped to the signing API, entered by the shop's own Sylius Admin.
graph LR
A["Admin pastes a CDN image URL"] --> B["ProductImage / TaxonImage path"]
B --> C{"Render request"}
C --> D["Storefront / Admin Twig"]
C --> E["Shop API"]
D --> F["mm-media-cdn Signing Service"]
E --> F
F --> G["Freshly signed, context-correct URL"]
Documentation
| Page | Content |
|---|---|
| Installation | Composer, bundle, routes, setup command, update |
| Configuration | CDN credentials in Admin, practical examples |
| Shop API | Headless/API Platform image delivery behaviour |
| Admin API | Create images with cdnUrl via the Admin API |
| Troubleshooting | Known issues, limitations, FAQ |
| Technical | Architecture, decision logic, caching |
Features
| Feature | Description |
|---|---|
| CDN image URL instead of upload | Admin enters an http(s) URL instead of a file - for both product images and taxon images |
| Creation via Admin API | External clients create images by cdnUrl instead of a file upload, with the same rules as the form |
| Context-correct resizing | Every Sylius Imagine filter size is mapped 1:1 to an imgproxy resize option, including WebP and quality 80 |
| Dual-mode | Works identically on the Twig storefront/Admin and on the headless Shop API channel |
| Secure signing | Signing is delegated to mm-media-cdn's own signing/ microservice - the plugin never holds the raw imgproxy secret |
| Encrypted credentials | The signing token is stored encrypted in the database, derivable only from APP_SECRET |
| Fails safe | A foreign URL, an unconfigured plugin, or a signing failure never breaks an image - at worst it serves an unoptimized URL |
Requirements
| Requirement | Version | Notes |
|---|---|---|
| Sylius | ^2.2.7 | |
| PHP | ^8.3 | including the sodium extension (token encryption) |
| Symfony | ^7.4 | |
| LiipImagineBundle | ^2.7 | decorated, no own configuration needed |
| mm-media-cdn | - | separate server with its own signing microservice |
License
Commercial license: one Sylius installation (all channels, plus development/staging environments) per license, no redistribution, updates for 12 months from purchase.
Support
Email: support@markus-michalski.net