4
votes

If I export a shape with drop shadow as SVG, the drop shadow get's rasterized. Why?

The <feDropShadow> filter works great! I don't want ugly rasters in my clean sharp SVGs. Rasters are evil. :(

Even when importing (e.g. this SVG) Illustrator ignores the filters.

Is there a way to force Illustrator to use a filter for the shadow without drawing the shadow by myself?

2

2 Answers

2
votes

There is a way

All you need to do, is use svg-filters specifically when you want to work with svg. Click Add New Effect/SVG Filters/Apply SVG Filter

enter image description here

Then you can select shadow presets (or use a gaussian blur to create the shadow yourself), then click on the fx button, then you can edit the actual code the svg will make and finally click on update preview to see the changes you have made.

enter image description here

I don't know why adobe doesn't create a UI for this method, but you can just change the properties yourself to get the desired look you need.

1
votes

I am unable to answer your question directly, however, I can suggest a solution -- use Inkscape (it's free).

Apparently, Illustrator does not fully support SVG filters.

With Inkscape, all you have to do to add a drop shadow once you open your SVG file is to select the object that you want to add a drop shadow to and then in the top bar you've got Filters -> Shadows and Glows -> Drop Shadow.

Hope it's helpful.