svg code export issues
I export svgs from Illustrator in order to animate them. I use File - Export as - SVG. Now with version 26.1 when I export an svg, none of the layer(id names) are correct. The exported svg is naming them <svg id="a", id="b" and so on.
A temporary fix is uninstalling and reinstalling, but the issue reappears before the day is over. The previous version 26.0.3 works with no issues.
-
Satish Shastry commented
Error while exporting. Tried all methods ( export as SVG and Save as - SVG). Still I am getting error. Please check attachment.
-
Dirk Schulze commented
To the original post (File > Export As > SVG), make sure to select "Layer Names" in "Object IDs".
There was an issue in some Illustrator versions where the selection "Minify" did not respect the choice of "Object IDs". This has been fixed.
To:
> When I export an SVG, I choose "unique" for Object IDs. In the past, Illustrator would take my layer names and use them in a "data-name" attribute on the SVG tags.This is no longer reproducible in 27.2 and does seem to be fixed. Please retry and open a new ticket should this still persist for you.
To:
>there is no width attribute in the <image> tagThis has been fixed.
To:
> We are using "data-name" attribute to manage elements color, text etc in webApps. It is very critical for us.Please add more details about your workflow. Ideally create a new ticket.
To:
>.st0{fill:url(#Element1_00000070839701103496739130000017927991525955991726_);}Please try the Asset Export panel or File > Export which should not have this issue.
-
Feek commented
Stumbled on the same issue! Very annoying! need to remove all added additional unique id numbers.
-
Alan commented
Please fix export SVG issues . I already contacted Adobe a year ago, it is really frustrating that we have to rename all the CSS id (very long code):
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 27.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 23.5 134.2" style="enable-background:new 0 0 23.5 134.2;" xml:space="preserve">
<style type="text/css">
.st0{fill:url(#Element1_00000070839701103496739130000017927991525955991726_);}
.st1{fill:url(#Element2_00000049193584967467379020000002786377610459732137_);}
.st2{fill:url(#Element3_00000119099405853960727760000012129400699346644892_);}
.st3{fill:url(#Element4_00000127763402639353236960000004384639962182939019_);}
.st4{fill:url(#Element5_00000183225170672680930050000000872131482959555248_);}
.st5{fill:url(#Element6_00000093864638489881582570000014249859913588461702_);}
.st6{fill:url(#Element7_00000105417105270663866540000006694749511935005351_);}
.st7{fill:url(#Element8_00000084522155508520472560000004275569045362201261_);}
.st8{fill:url(#SVGID_1_);}
.st9{fill:url(#Element10_00000123402603479871893080000009780461618554744241_);}
.st10{fill:#6D6E71;}
.st11{fill:url(#Element12_00000138556445849759170910000005679636412519375287_);}
.st12{fill:#BC2027;}
.st13{fill:#EB2329;}
.st14{fill:#FFFFFF;stroke:#000000;stroke-width:0.9851;stroke-miterlimit:9.2453;}
.st15{fill:#E61E27;}
.st16{fill:#BABDBD;}
.st17{fill:url(#element20_00000161621453403960027420000006033894451057889676_);} -
Kuanysh Stikeyev commented
We are using "data-name" attribute to manage elements color, text etc in webApps. It is very critical for us.
Version 26.5 still missing. Downgraded to 26.0.3
-
Adam commented
When I export an SVG, I choose "unique" for Object IDs. In the past, Illustrator would take my layer names and use them in a "data-name" attribute on the SVG tags.
It no longer does this, and I'm unable to do what I need to do. Needed to downgrade to 26.0.3 to resolve this.
-
Steve F commented
Our team uses the svg IDs to manage the recoloring of paths in icons in web site components. The name of the layer the path is on becomes the path ID and now the new id "a", "b" etc. breaks our established system. We have to use Illustrator 25 until this is corrected.
-
Benjamin Ebert commented
This is a very big issue for me as well. Need this feature fixed for my day-to-day for work.
Reinstalling an older version and using that until this gets fixed. -
christopher kull commented
This is still an issue on version 26.2.1.
Using 26.0.3 again now. -
Isaac Englart commented
Same issue for me.
These look to be related or same issue:
-
sabrina commented
Same thing happening here. Reverted back to 25.4.5 for now because that version has been the most stable for me for a while now.
-
Bryan Pettit commented
I'm having a similar issue—when exporting an Illustrator file with an embedded PNG screenshot (via File > Place), the <image> tag in the exported SVG is no longer being created with width and height attributes. This creates an error when trying to use the exported SVG in XMLmind (stating that there is no width attribute in the <image> tag; I think SVGs are processed via an addon called Apache Batik in XML). We're on an enterprise cloud subscription of Illustrator, so at any given time we should be on the most up-to-date version. In a similar file exported to SVG back in January 2021, it worked just fine. In the attached screenshot, both the top and bottom files were exported to SVG in Illustrator using the same settings—the top is the file converted in Jan. 2021, and the bottom is a file converted this morning.
-
Wendy Mackay commented
I am having the same issue. It's very frustrating! Past versions worked really well.