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.
> 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.
>there is no width attribute in the <image> tag
This has been fixed.
> 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.
Please try the Asset Export panel or File > Export which should not have this issue.
Stumbled on the same issue! Very annoying! need to remove all added additional unique id numbers.
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">
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
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:
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.