C
C
Cheizer2019-10-03 23:20:04
css
Cheizer, 2019-10-03 23:20:04

Why doesn't SVG mask from file work?

Friends, what am I doing wrong, please tell me why my SVG mask from the file does not work?
I have a picture I
mountains-hero.jpg
have an SVG mask
stampTiles.svg
I do this

<svg width="587" height="390" viewBox="0 0 587 390">
  <defs>
    <mask id="mask">
      <image width="587" height="390" xlink:href="http://travel.toways.ru/stampTiles.svg" />
    </mask>
  </defs>
  <image mask="url(#mask)" width="587" height="390" xlink:href="https://c402277.ssl.cf1.rackcdn.com/photos/2325/images/hero_small/mountains-hero.jpg" />
</svg>

As a result, I want to get a picture with beveled corners.
5d9657927a8cb703590033.png
It doesn’t work, the picture completely disappears for some reason :( there is an idea that it doesn’t work due to the fact that the SVG file is located remotely, but no, I tried it locally when all the pictures in the same folder are the same result.
Please tell me how to apply such an SVG mask from file?
Here is a live example https://codepen.io/Cheizer/pen/ExxYNZr

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Sartakov, 2019-10-04
@Cheizer

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question