Improve SVG #59
Closed
timkelty
started this conversation in
Feature Requests & Enhancements
Replies: 2 comments 2 replies
-
The easiest solution currently is using the webroot e.g.
Which directly injects the SVG into a template. |
Beta Was this translation helpful? Give feedback.
2 replies
-
This is solved by #9, which is now in opt-in beta testing. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Unfortunately, SVG references with
use
, by definition, don't allow cross-origin requests: w3c/svgwg#707This means that Cloud users will be unable to use SVG/use with artifacts, because they will be cross-origin (cdn.craft.cloud).
A quick workaround is to simply stick the SVG in your
templates/
directory, allowing it to be servable from your site's domain.Even #9 wouldn't fix this, as even subdomains are considered cross-origin in this case.
Beta Was this translation helpful? Give feedback.
All reactions