Shartl Posted September 26, 2020 Posted September 26, 2020 Hello everyone, I'm trying to create SVG with a unique object ID. I want to build this into Wordpress with Elementor. When I create an SVG via Affinity I have the following problem after uploading it in Wordpress. If I change the image of the first icon, all other images on the page change. Elementor Support said the following. "When many of your SVG is having the same ids, it results in the icon receiving the styling of the subsequent SVG icon on that page. To resolve this issue, please import and export the SVG files within Adobe illustrator by navigating to File> Export > Export As and simply enabled the unique Object ID's feature as illustrated in the image linked below. " Can someone help me how I can solve this problem. Many Thanks Quote
v_kyr Posted September 26, 2020 Posted September 26, 2020 Hi, hard to tell without seeing your SVG output code here, aka the plain XML code Affinity generates then when exporting your working file as SVG. AS you may know SVG is simply a XML textual based format, thus you can inspect it inside any text editor of your choice. Object/element IDs when used should of course be unique, in order to distinguish one object/element from another. Meaning here, every image should have it's own unique ID then, so no other image has the same ID. - In Affinity Designer etc. I would name each image layer different (layers and group layers), since that's what finally will build custom ID's here then for an SVG export. Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2
Shartl Posted September 27, 2020 Author Posted September 27, 2020 Hi, Thanks for the quick answer, I have to admit that I am overwhelmed with the topic, I made an SVG from a PNG, it was only 1 layer which I named differently. I'll attach both SVG. Thank you so much for the help Letter10.svg Microphone10.svg Quote
v_kyr Posted September 27, 2020 Posted September 27, 2020 I assume the problem for this Elementor might be the following then ... Letter10.svg Microphone10.svg Since you created two seperate SVG files with always just one embedded image, the "image id" reference part inside the SVG files is in both files the same (namely <image id="_Image1" ...). You can try if it makes a difference for that Elementor, if you edit let's say the "Microphone10.svg" file to use and reference _Image2 instead ... Microphone10.svg Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2
Shartl Posted September 27, 2020 Author Posted September 27, 2020 Thank you very much it worked. Without you I would have been lost. THANK YOU v_kyr 1 Quote
v_kyr Posted September 27, 2020 Posted September 27, 2020 You are welcome! Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2
DarkClown Posted September 9, 2023 Posted September 9, 2023 Like to bring up this issue again ... since (despite the fact that it solves the problem) of course this a pretty crippled solution. You can't manually edit large amounts of svg you export for wordpress. Would be a good idea to enable constantly increasing Object IDs with starting/offset value in the export dialog. Quote i7-12700KF, 3.60 GHz, 32GB RAM, SSD, NVIDIA GeForce RTX 3070, Wacom Intuos 4 Tablet, Windows 11 Pro - AP, AD and APublisher V1 and V2https://www.timobierbaum.com
walt.farrell Posted September 9, 2023 Posted September 9, 2023 7 minutes ago, DarkClown said: You can't manually edit large amounts of svg you export for wordpress. It sounds like you're editing the SVG code to include the code into a wordpress article. Why not simply point to and embed the SVG file, just as you would an image file, rather than including the code directly. Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 18.5, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.5
DarkClown Posted September 9, 2023 Posted September 9, 2023 3 minutes ago, walt.farrell said: It sounds like you're editing the SVG code to include the code into a wordpress article. Affinity exports all SVG files with an identical Image ID. Wordpress can't deal with that. To distinguish between different SVG it needs unique Image IDs. I'd like to have the different Icons accessible from within the media library for re-usability purpose and because e.g. elementors widgets (icon box) don't support direct linking - instead they point to the media library or their own Icon Libraries. walt.farrell 1 Quote i7-12700KF, 3.60 GHz, 32GB RAM, SSD, NVIDIA GeForce RTX 3070, Wacom Intuos 4 Tablet, Windows 11 Pro - AP, AD and APublisher V1 and V2https://www.timobierbaum.com
Vik Martin Posted July 25, 2024 Posted July 25, 2024 I'm having a similar problem. I've tried changing the image ID in a text editor but when I do that the image disappears. Can anyone help? Quote
Vik Martin Posted July 26, 2024 Posted July 26, 2024 Oops - sorry, I've answered my own question. I was trying to export a rasterised layer! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.