SVG Size Bloated by “adobe_illustrator_pgf” tag

web dev here. I just received a 400 KB SVG of a very simple icon. It didn’t make any sense, so I looked in the SVG file and almost the entire size of the SVG is in a tag with an id of “adobe_illustrator_pgf”. I tried to look this up, but Google was convinced I was spelling PDF wrong. What is this? I removed it and the SVG size dropped to 8 KB! Is there something I can ask the design team to do to remove this automatically on export?

Answer

I assume you are seeing something like this, followed by a lot of code:

<i:pgf  id="adobe_illustrator_pgf">
    <![CDATA[

eJzsvWuvHMmRJfi9gPoPuR8akAbNVPjbQ9to4OZ99GpHL6jUGjUagwLFuipxxCILLJbU2l+/55i7
x8PN8968JKWRMGRAJTIz0iPc3dzs2Puf/q9ffvHs6qs3v7t/5o7T4fPP/umfrt/eP3/35u2PD/Lx
4SevXn3/3bu3/OgHv/rhwaTjxLuufpK/rHf+5v7tdy/fvP7xwdqjKd/e8fc/OL189eovh//+w8MP
fsgPf/3y3at7fPzvr9/xb189Mz9cnoff3zx/h2/Nj0z+kZ3sdDD2x94frn4m9zx//afn33338v/j
HdFlxw9Pb75//dXL11+f3vwXPjXh8MymdHA+HZ6Zcsf/ . . . etc, etc.

The code is basically the entire Illustrator document, which is useless if you don’t need that. You can prevent this by asking your design team to make sure they uncheck the “Preserve Illustrator Editing Capabilities” option when saving the SVG.

enter image description here

Attribution
Source : Link , Question Author : Chris Hayes , Answer Author : Billy Kerr

Leave a Comment