Jump to content

Recommended Posts

Posted

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

Posted

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.

☛ 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

Posted

I assume the problem for this Elementor might be the following then ...

  • Letter10.svg

    letter_image_id.jpg.c63294fa76c25c877bb1b38fa4e42771.jpg
     
  • Microphone10.svg

    micro_image_id.jpg.c4289ff999a9693b599d4396dd1b1d14.jpg
     

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 ...

image2.jpg.2cd07afd38bd770649af53f296a5c0fa.jpg

☛ 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

Posted

You are welcome!

☛ 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

  • 2 years later...
Posted

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.

CRM.png.a048d588572393102ac3cc403bfa8af7.png

 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 V2
https://www.timobierbaum.com

Posted
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.

-- 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

Posted
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.

CRM.png.a048d588572393102ac3cc403bfa8af7.png

 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 V2
https://www.timobierbaum.com

  • 10 months later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.