CDN Product Images: Troubleshooting
Known issues, limitations and FAQ for the Sylius plugin CDN Product Images.
CDN Product Images: Troubleshooting
This documentation always describes the latest published version.
Live Demo: Try this and other plugins live — no installation, no risk: demo.markus-michalski.net
Common issues
Symptom: The "CDN Integration" sidebar entry is missing entirely.
Check: Are the plugin's Admin routes imported (config/routes/mmd_sylius_cdn_product_images.yaml)?
Solution: Add the route import per Installation and clear the cache - without the import, the plugin deliberately degrades to "menu entry missing" rather than breaking the whole Admin sidebar.
Symptom: The CDN image field shows up on taxon images but not on product images.
Check: Has the templates/bundles/SyliusAdminBundle/product/form/sections/media/images.html.twig template been added to your own app?
Solution: Add the override per Installation - unlike the taxon-image template, Sylius' product-image template has no hook point the plugin could attach to itself.
Symptom: A CDN image displays, but always at its original size instead of cropped.
Check: Does the URL actually live on the configured CDN domain, and was it originally generated as an mm-media-cdn "original" URL?
Solution: Only such a URL is recognized and re-signed; a URL on a different host, or already carrying a different preset, is deliberately passed through unchanged.
Symptom: The "CDN Integration" settings page returns HTTP 500.
Check: Were individual routes copied by hand instead of importing the full admin.yaml - missing the token-removal route as a result?
Solution: Import the Admin routes wholesale instead of copying individual routes (see Installation).
Symptom: A form POST with a clearToken field no longer removes the stored token.
Check: Does the request come from an older script or Behat scenario still simulating a now-removed checkbox?
Solution: Use the dedicated "Remove token" button (or its own route) instead - the field is deliberately ignored.
Symptom: After rotating your own APP_SECRET, CDN images suddenly stop being signed.
Check: Does the settings page show a notice that a token is stored but can no longer be decrypted?
Solution: Expected behaviour. Remove it via "Remove token" and re-enter the token once.
Symptom: POST /api/v2/admin/products/{code}/images with cdnUrl returns HTTP 400.
Check: Was file or productVariants sent as well, or is the URL not a valid http(s) URL of at most 255 characters?
Solution: Send either file or cdnUrl, and do not combine productVariants with cdnUrl. Details on the Admin API page.
Known limitations
- Only creating a new product or taxon image supports a CDN URL, through the Admin form as well as through the Admin API. Switching an already-uploaded local image to CDN mode via the edit form is not implemented yet.
- Via the Admin API,
productVariantscannot be combined withcdnUrl, andcdnUrlis not yet in the OpenAPI documentation. - No reachability validation of the entered URL on save.
- The product-image field needs a one-time template override in the consuming app (see Installation) - taxon images don't need this.
- No integration test suite against a real, bootable Sylius application yet; CI only runs the unit suite.
FAQ
General
- Can I use CDN images and local uploads at the same time? Yes, per image - detection is purely based on the
http(s)://path prefix. - What happens with a URL that isn't from mm-media-cdn? It's passed through unchanged, with no error, but without context-correct resizing.
Configuration
- Do I need to set anything in
config/packages/? No, configuration happens entirely through the Sylius Admin interface. - What happens if I leave the signing-token field blank and save? The currently stored token stays unchanged - use the dedicated button to remove it.
Compatibility
- Does the plugin work without the Shop API? Yes - the API decoration only activates when
SyliusApiBundleis registered, everything else works independently of that.