Could it convert a SVG to JPG so I can apply filters (like greyscale)?

Enonic version: 6.9.2
OS: Mac OSX and Linux

Would something like this work on a SVG (forced into a JPG):
imageUrl({format: ?, filter:‘grayscale()’})

http://xp.readthedocs.io/en/stable/reference/view-functions/imageUrl.html?highlight=format

I guess it could in the future, but right now svg’s are not supported by the image service. There are interesting uses cases for turning svg’s into rastered images

@cwe, you can apply SVG filters on top of IMG elements, so I guess the same would work on top of SVG elements as well?

Example of grayscale IMG using an SVG filter:
http://jsfiddle.net/KDtAX/487/

I can confirm that CSS grayscale filters works on SVG.

1 Like

Have you tried in IE11 :slight_smile: Cause they removed the old way of doing grayscale, and have not added support for CSS3 filters yet.

Haven’t tried in IE11, but there should be workarounds, such as this: http://www.majas-lapu-izstrade.lv/cross-browser-grayscale-ie11/