Skip to content
Discussion options

You must be logged in to vote

When you specify relative URLs, Next processes it, that's why you see this:

.element {
  filter: url(../media/file.xxxx.svg);
}

Since you have your svg in public folder, you can simply use the absolute path

.element {
  filter: url("/file.svg#filter-cta");
}

However, the relative path should still work, so the fact that you don't see the filter indicates that there are some problems with SVG itself.

Make sure that your SVG looks similar to this:

<svg xmlns="http://www.w3.org/2000/svg" width="230" height="120">
  <filter id="element-id">
    <feDropShadow dx="4" dy="8" stdDeviation="4"/>
  </filter>
</svg>

And that you target correct id in your css

.element {
  filter: url("/file.svg#eleme…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hashfiputra
Comment options

Answer selected by hashfiputra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants