As far as I understand (by reading previously posted questions on stackoverflow) that cropping an image using svg coorindates is possible, but it is possible to crop an image by using an svg link? for example: <img src="http://imgh.us/face01.svg">
Asked
Active
Viewed 598 times
1

Glorfindel
- 21,988
- 13
- 81
- 109

kenhimself
- 267
- 4
- 14
-
http://stackoverflow.com/questions/3634663/masking-an-image-with-selectable-text-with-svg-possible – rnrneverdies Nov 14 '14 at 03:14
2 Answers
2
Yes. You can do it using the mask-image
property. This is supported on all browsers except IE.
.masked {
-webkit-mask-image: url(http://imgh.us/face01.svg);
mask-image: url(http://imgh.us/face01.svg);
}
<img src="http://lorempixel.com/400/400" width="400" height="400" class="masked">
Unfortunately you will still need to make other arrangements for IE.

Paul LeBeau
- 97,474
- 9
- 154
- 181
0
You can do it all inside SVG using the image element combined with a SVG mask or a SVG filter and have it work on IE10+ (and all other browsers). Here is the filter example:
<svg width="400px" height="400px">
<defs>
<filter id="crop-me" x="0%" y="0%">
<feImage xlink:href="http://imgh.us/face01.svg" result="area"/>
<feComposite operator="in" in="SourceGraphic" in2="area"/>
</filter>
</defs>
<image filter="url(#crop-me)" xlink:href="http://lorempixel.com/400/400" x="0" y="0" width="200" height="300"/>
</svg>

Michael Mullany
- 30,283
- 6
- 81
- 105