Skip to main content
Known Participant
Dec 15, 2022 1:29 PM UTC
Question

Variables Importer, SVG format

Hello everyone.

I'm currently using the Variable Importer 8 script.

Does anyone know if i can use a SVG file for the image variable?

When i select the prepend image path in the log it says the image is missing even though it's there.

The script seems pretty complex to me but maybe someone can adjust it to add SVG as compatible format.

 

Here's the script: https://github.com/Silly-V/Adobe-Illustrator/blob/master/Variable%20Importer/VariableImporter.jsx

 

Thanks in advance to everyone willing to help me!

Cheers!

7 replies

Participant
Nov 21, 2026 5:32 AM UTC

Hi Kangi,

There are two separate issues here.

  1. The "missing" message comes from a path check. As far as I can see in the script source, the Images log only tests whether a file exists at the path it builds: your prepend folder, a slash, then the cell contents. The extension plays no part in that test, so compare the path shown in the log with the real one character by character. Typical causes are a cell that says "logo" rather than "logo.svg", a stray space, or a cell that already holds a full path.
  2. Once the path is right, the SVG still won't swap in. Illustrator can't hold an SVG as a linked file. It converts it to ordinary artwork on import, and a Linked File variable needs a real link. An Adobe community manager confirmed this in another thread, so editing the script won't get around it: https://community.adobe.com/t5/illustrator-discussions/how-to-link-svg-files-in-data-merge-using-the-variables-panel-in-illustrator/td-p/12140463

To keep everything vector, batch-save the SVGs as .ai or PDF (record an Action with Save As, then run Batch from the Actions panel menu on the folder) and point your image column at those files. Vasily's own article "Illustrator Variable Data: Bringing in editable Illustrator assets" uses linked .ai files this way. PNG is fine too if the artwork never needs to scale.

If you need the SVG itself imported, that takes a separate script built on groupItems.createFromFile(), which bypasses variables altogether.

For context, I'm with FashionMe , where we handle sourcing and made-to-order apparel along with relabeling, custom hang tags and branded packaging. Tag and label artwork is a classic variable-data job (one template, a different logo and size per SKU), and client logos reach us in every format, SVG included.

Hope this helps!

Translate
Participant
Sep 26, 2025 7:22 PM UTC

Hi Kangi,

I’ve worked with the Variable Importer script before, and from my experience, Illustrator doesn’t natively support SVG files as variable images in the same way it does with raster formats (like JPG, PNG, TIFF, etc.). That’s why you’re seeing the “image missing” error — the script is looking for a supported raster format.

A workaround you could try:

  • Convert your SVGs into high-resolution PNGs or TIFFs before importing.

  • Keep the converted images in a dedicated folder and point the Variable Importer path there.

  • If you want to retain vector scalability, you may need to manually link SVGs into your template rather than through the variables panel.

It’s not as elegant, but it avoids compatibility issues. Unless someone rewrites parts of the script to add SVG support, this is usually the safest route.

By the way, I totally get where you’re coming from. In our line of work with custom sportswear manufacturing, we also deal with vector graphics daily — from team logos to complex design patterns. While SVG is great for scalability, most production workflows (like sublimation printing or embroidery setup) still require raster conversions at some point. So, even in apparel design, we often prep both raster and vector versions depending on the process.

Hope this helps clear things up a bit!

Cheers,
Hamid Jadoon

Translate
Silly-V
Legend
Sep 26, 2025 9:07 PM UTC

The new plugin "Darty-Ai" at https://darty.ai now imports the SVGs, which have a special advantage! Their layer-names are preserved and lend the imported structure to be further manipulable by Darty-Ai. Such as: import an SVG, then move around one of the contained shapes, by name. Or, import an SVG and change all the colors on all the shapes, maybe even add extra strokes or set a new effect on a particular object.

Translate
Mylenium
Legend
Dec 15, 2022 6:16 PM UTC

I'm not that steeped in AI scripting and can only tell you these things from my generic knowledge of scripting in other apps or the web. I'm sure I could figure it out, given enough time, but this is really one heck of a script to chew through and looking up the correct code for the import would be it's own research...

 

Mylenium 

Translate
Mylenium
Legend
Dec 15, 2022 2:40 PM UTC

The import options would indeed have to be adapted to use of other files by defining the importer functions and variables. In this case it seems the getScriptImage() function needs to be modified accordingly. Not sure which specific options the SVG dialog requires, though.

 

Mylenium

Translate
DelrestoAuthor
Known Participant
Dec 15, 2022 5:02 PM UTC

Hi @Mylenium and thank you for replying.

Unfortunately i have no enough skill to work on this pretty complex script.

A couple of weeks ago I tried to reach out to @Silly-V, who is the creator of the script, cause I had problems using EPS format images, thus here I am, trying to use SVG. But he didn't respond and I don't want to write to him again cause I don't want to bother him. But I hope he can read this and tell me if there's a solution.

He or anyone skilled enough to work on this script!

 

Anyway, thanks and cheers!

Translate
Silly-V
Legend
May 31, 2025 9:08 PM UTC

I was away on 'business' for some years, but if you remember what the SVG-path issue was - let me know, I may be able to fix it up.

Translate