Skip to content

fix: Fix svg file build - #206

Merged
Quan Do (quando1910) merged 1 commit into
trunkfrom
fix/fix-svg-file-build
Aug 28, 2026
Merged

fix: Fix svg file build#206
Quan Do (quando1910) merged 1 commit into
trunkfrom
fix/fix-svg-file-build

Conversation

@quynhnguyen68

@quynhnguyen68 Quynh Nguyen (quynhnguyen68) commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

1. Why is this change necessary?

Release to Store fails at shopware-cli account producer extension upload:

Invalid SVG file "SwagExtensionStore/src/Resources/app/administration/static/img/analytics/promotion/graphic.svg": SVG files with active content are not allowed.
Invalid SVG file "SwagExtensionStore/src/Resources/app/administration/static/img/payments/dashboard/shopware-payments-dashboard-marketing.svg": SVG files with active content are not allowed.

The Shopware Account (SBP) upload validator runs an allowlist of SVG elements, and <filter> plus the fe* filter primitives are not on it. Comparing the element sets of all four SVGs under src/ isolates it: filter/fe* is the only element family present in both rejected files and absent from both accepted ones.

This check is server-side only — shopware-cli extension validate --store-compliance reports 0 errors locally, which is why the pipeline reaches the upload step before failing.

2. What does this change do, exactly?

We fixed the two files using different approaches to preserve their visual designs:

analytics/promotion/graphic.svg (Kept as SVG):
Removed the forbidden drop-shadow filter. Since the shadow was needed to separate the white card from the background, it was replaced with a simple, clean gray border (stroke="#D8DDE6"). The file now passes validation.

payments/dashboard/shopware-payments-dashboard-marketing.svg (Converted to PNG):
Converted this file to a high-quality PNG. The blur effect in this image was essential to the design and couldn't just be removed. Additionally, the original SVG was already heavily relying on embedded base64 raster images. The Twig template has been updated to use the new PNG format.

@quando1910
Quan Do (quando1910) merged commit 90932ad into trunk Aug 28, 2026
3 checks passed
@quando1910
Quan Do (quando1910) deleted the fix/fix-svg-file-build branch August 28, 2026 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants