# Image to SVG Vectorizer – Convert PNG & JPG to SVG in Bulk (`gazidev/image-vectorizer`) Actor

Bulk raster-to-SVG converter for logos, icons, line art, cutting machines (Cricut, laser) and print. Color or black-and-white modes, spline or polygon curves. Open-source vtracer on CPU, no API key. Bulk URLs or a dataset. $2 per 1,000 SVGs.

- **URL**: https://apify.com/gazidev/image-vectorizer.md
- **Developed by:** [Cemal Atakli](https://apify.com/gazidev) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 svg createds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Image to SVG Vectorizer – Convert PNG & JPG to SVG in Bulk

Turn raster images (PNG, JPG, WebP, GIF, BMP, TIFF) into **scalable SVG vector files** in bulk. Paste a list of image URLs or point the Actor at an Apify dataset, and get one SVG download link per image, plus its size and number of paths. Made for **logos, icons, clip art, line art, stickers, stencils and cut files for Cricut, Silhouette and laser cutters**.

**$2 per 1,000 SVGs ($0.002 per image).** Failed downloads, non-images, blank results and over-size results are **free**.

The tracing engine is the open-source [vtracer](https://github.com/visioncortex/vtracer) (MIT) running on CPU inside the Actor: no API key, no third-party AI service, your images are not sent anywhere else.

### What it does

- **Colour mode**: keeps the image's colours, stacking shapes in layers (or non-overlapping *cutout* layers for layered vinyl and cutting).
- **Black & white mode**: one-colour silhouette of the dark shapes, like potrace. Good for stencils, vinyl decals, engraving and laser cutting.
- **Curve fitting**: smooth Bézier *spline* curves (default), straight-segment *polygons* for geometric logos, or *none* for pixel-exact edges.
- **Tuning**: speckle filter (remove noise), colour precision, gradient step, corner threshold, segment length and coordinate decimals, the same knobs as the vtracer web app.
- **Transparency kept**: transparent PNG backgrounds stay empty in the SVG. Soft shadows and anti-aliased edges are handled at 50% opacity, so they are not traced as black blobs.
- **Every SVG has a `viewBox`**, so it scales cleanly in browsers, Inkscape, Illustrator, Figma, Cricut Design Space and LightBurn.
- **Bounded cost**: images are downscaled to `maxMegapixels` (1 MP by default) before tracing. A quick test trace detects photos and traces them at `photoMaxMegapixels` (0.3 MP), because photo SVGs get huge.

### Good inputs and bad inputs (please read)

Vectorizing works best on **flat-colour artwork**: logos, icons, emoji, clip art, cartoons, signatures, line drawings and scanned black-and-white art. A 330 px logo becomes a ~25 KB SVG with about a dozen paths.

**Photos are a poor fit for any automatic vectorizer.** A 0.3 MP photo becomes a posterised SVG with 2,000–7,000 paths and 1–4 MB. Such rows carry a `note`. If the SVG would be larger than `maxSvgMb` (20 MB), it is not saved and not charged. For photos, raise `filterSpeckle`, lower `colorPrecision`, or use black & white mode.

This is an automatic tracer, not an AI redraw. A blurry, low-resolution logo gives a faithful trace of its blur. Upscale it first with our [AI Image Upscaler](https://apify.com/gazidev/image-upscaler), or remove the background with our [Background Remover](https://apify.com/gazidev/background-remover), then chain the result into this Actor.

### Use cases

- **Print on demand and merch**: convert logo PNGs into SVGs that print sharply at any size.
- **Cricut / Silhouette / laser cutting**: black & white or cutout mode gives closed shapes you can weld, cut and engrave.
- **Web and apps**: replace icon PNGs with small SVGs that stay crisp on retina screens.
- **Brand asset clean-up**: vectorize a folder of client logos from a spreadsheet or a scraper dataset in one run.
- **Scraper pipelines**: chain after [Company Logo Finder](https://apify.com/gazidev/company-logo-finder), [Favicon Extractor](https://apify.com/gazidev/favicon-extractor) or [Image Downloader](https://apify.com/gazidev/image-downloader) with `datasetId` + `datasetField`.

### Input example

```json
{
  "imageUrls": [
    "https://upload.wikimedia.org/wikipedia/commons/thumb/4/44/Recycle001.svg/330px-Recycle001.svg.png",
    "https://upload.wikimedia.org/wikipedia/commons/thumb/6/60/Cat_silhouette.svg/330px-Cat_silhouette.svg.png"
  ],
  "colorMode": "color",
  "curveMode": "spline",
  "filterSpeckle": 4,
  "colorPrecision": 6
}
```

Other sources: `bulkText` (one URL per line, or a CSV with a `url` column) and `datasetId` + `datasetField` (any Apify dataset you can read; for example `outputUrl` from Background Remover or `storedUrl` from Image Downloader). `maxImages` (default 100) caps each run; set 0 for no limit.

### Output example

```json
{
  "input": "https://upload.wikimedia.org/wikipedia/commons/thumb/4/44/Recycle001.svg/330px-Recycle001.svg.png",
  "status": "vectorized",
  "svgUrl": "https://api.apify.com/v2/key-value-stores/1LqWIwrdb3qMGadSm/records/00001-330px-Recycle001-9ff48c.svg?signature=...",
  "svgKey": "00001-330px-Recycle001-9ff48c.svg",
  "width": 330,
  "height": 312,
  "originalWidth": 330,
  "originalHeight": 312,
  "resized": false,
  "paths": 12,
  "svgBytes": 24448,
  "colorMode": "color"
}
```

Failed rows have `status: "error"`, an `errorCode` (`HTTP_404`, `NOT_AN_IMAGE`, `EMPTY_RESULT`, `SVG_TOO_LARGE`, `TOO_LARGE`, `PRIVATE_HOST`, `INVALID_URL`, ...) and a readable `error`. The `OUTPUT` record in the key-value store has run totals and the settings used. The SVG files are in the run's key-value store; `svgUrl` is a direct, shareable link.

### Pricing

| Event | Price |
|---|---|
| SVG saved (`image-vectorized`) | $0.002 per image ($2 per 1,000) |
| Actor start | $0.00005 per run |

Not charged: failed downloads, non-image files, blank results (`EMPTY_RESULT`), results over `maxSvgMb`, invalid or private URLs, duplicates. You can cap the spend with the **maximum total charge** setting of a run: the Actor stops cleanly at the limit, and `OUTPUT` shows `stoppedAtMaxCharge` and how many images were not processed.

How it compares (Apify Store, November 2026, published prices):
| Actor | Price per image |
|---|---|
| **This Actor** | **$0.002** |
| jumblemog/image-vectorizer | $0.01 |
| vncntlabs/png-to-svg-vectorizer | $0.02 |

Other Store vectorizers do not publish a flat per-image price. Some competitors offer extras we do not have, such as PDF/DXF output or an AI upscale pre-pass. This Actor outputs SVG only.

### How it differs from our other image Actors

[Image Converter](https://apify.com/gazidev/image-converter) and [Image Compressor](https://apify.com/gazidev/image-compressor) change raster formats and file size; they never produce vectors. This Actor is the only one in our portfolio that traces shapes into SVG paths. Typical chain: **Background Remover → Image to SVG Vectorizer** for a clean transparent logo SVG.

### FAQ

**Which settings should I try first?** The defaults suit most logos. For noisy scans raise `filterSpeckle` to 8–16. For fewer colours lower `colorPrecision` to 4–5 or raise `layerDifference` to 32+. For sharp-cornered logos use `curveMode: polygon`.

**Why is my black & white result empty?** Black & white mode traces dark shapes only. Light or yellow artwork on white has none. The row is free; use colour mode.

**Can it read SVG, PDF or EPS input?** No. Input must be a raster image. Animated GIFs use the first frame.

**Is there an image size limit?** Downloads up to 25 MB (`maxFileSizeMb`, max 100) and up to 50 megapixels. Larger images are rejected for free. Everything is downscaled to `maxMegapixels` (max 4) before tracing.

**Are my images safe?** Images are downloaded, traced in the Actor's container and stored only in your own Apify storage. Private-network and localhost URLs are refused. The Actor identifies itself with an honest User-Agent; it does not bypass bot protection or logins.

### Use with AI agents (Apify MCP)

Add this Actor to any MCP client through the Apify MCP server (`https://mcp.apify.com`, tool `gazidev/image-vectorizer`). An agent can pass logo URLs, choose `colorMode`, and read `svgUrl`, `paths` and `svgBytes` from the results.

# Actor input Schema

## `imageUrls` (type: `array`):

Direct links to PNG, JPG, WebP, GIF (first frame), BMP or TIFF files. Logos, icons, clip art and line art give the cleanest SVGs. Duplicates are removed; invalid values and failed downloads are reported for free.

## `bulkText` (type: `string`):

One URL per line, or a CSV with a `url` / `image` column.

## `datasetId` (type: `string`):

Chain after a scraper, our Image Downloader or Background Remover.

## `datasetField` (type: `string`):

Arrays of URLs are accepted too.

## `colorMode` (type: `string`):

Black & white traces the dark shapes only (good for stencils, vinyl, laser and Cricut cut files). Light-coloured artwork gives an empty result in this mode (free).

## `curveMode` (type: `string`):

'Polygon' suits geometric logos and pixel-art-like shapes; 'None' keeps every pixel step.

## `hierarchical` (type: `string`):

Colour mode only.

## `filterSpeckle` (type: `integer`):

Discard patches smaller than this many pixels (square side). Raise it to remove noise and shrink the SVG.

## `colorPrecision` (type: `integer`):

Significant bits per RGB channel. Lower = fewer colours and smaller SVGs.

## `layerDifference` (type: `integer`):

Colour difference between gradient layers. Higher = fewer layers.

## `cornerThreshold` (type: `integer`):

Minimum angle that counts as a corner (spline mode). Lower = smoother, rounder shapes.

## `lengthThreshold` (type: `number`):

Advanced: perform iterative subdivide smoothing until all segments are shorter than this.

## `spliceThreshold` (type: `integer`):

Advanced: minimum angle displacement to splice a spline.

## `pathPrecision` (type: `integer`):

Decimal places in path coordinates. 0–1 gives smaller files.

## `keepTransparency` (type: `boolean`):

Colour mode: fully transparent areas stay empty in the SVG (pixels under 50% opacity count as transparent). Off: transparency is filled with the background colour below. Black & white mode always uses the background colour.

## `backgroundColor` (type: `string`):

Hex colour that semi-transparent pixels are blended onto.

## `maxMegapixels` (type: `number`):

Larger images are downscaled first (aspect ratio kept). Bounds run time and SVG size: 1 MP (e.g. 1000×1000) is plenty for logos and icons, since the result is a vector anyway. Max 4.

## `photoMaxMegapixels` (type: `number`):

A quick test trace on a thumbnail detects photos and detailed illustrations (hundreds of colour regions). Those are downscaled to this size before tracing, because their SVGs grow huge and slow with every extra pixel. Raise it (up to Max image size) if you really want detailed photo SVGs.

## `maxSvgMb` (type: `integer`):

Larger results (typically photos) are not saved and not charged; the row explains how to reduce them.

## `maxImages` (type: `integer`):

Safety cap per run. 0 = no limit.

## `maxFileSizeMb` (type: `integer`):

Larger files are skipped for free.

## `maxConcurrency` (type: `integer`):

Tracing itself runs one image per GB of run memory.

## `proxyConfiguration` (type: `object`):

Only needed if an image host blocks datacenter IPs.

## Actor input object example

```json
{
  "imageUrls": [
    "https://upload.wikimedia.org/wikipedia/commons/thumb/4/44/Recycle001.svg/330px-Recycle001.svg.png",
    "https://upload.wikimedia.org/wikipedia/commons/thumb/6/60/Cat_silhouette.svg/330px-Cat_silhouette.svg.png"
  ],
  "datasetField": "url",
  "colorMode": "color",
  "curveMode": "spline",
  "hierarchical": "stacked",
  "filterSpeckle": 4,
  "colorPrecision": 6,
  "layerDifference": 16,
  "cornerThreshold": 60,
  "lengthThreshold": 4,
  "spliceThreshold": 45,
  "pathPrecision": 2,
  "keepTransparency": true,
  "backgroundColor": "#ffffff",
  "maxMegapixels": 1,
  "photoMaxMegapixels": 0.3,
  "maxSvgMb": 20,
  "maxImages": 100,
  "maxFileSizeMb": 25,
  "maxConcurrency": 4
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `results` (type: `string`):

No description

## `files` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "imageUrls": [
        "https://upload.wikimedia.org/wikipedia/commons/thumb/4/44/Recycle001.svg/330px-Recycle001.svg.png",
        "https://upload.wikimedia.org/wikipedia/commons/thumb/6/60/Cat_silhouette.svg/330px-Cat_silhouette.svg.png"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("gazidev/image-vectorizer").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "imageUrls": [
        "https://upload.wikimedia.org/wikipedia/commons/thumb/4/44/Recycle001.svg/330px-Recycle001.svg.png",
        "https://upload.wikimedia.org/wikipedia/commons/thumb/6/60/Cat_silhouette.svg/330px-Cat_silhouette.svg.png",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("gazidev/image-vectorizer").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "imageUrls": [
    "https://upload.wikimedia.org/wikipedia/commons/thumb/4/44/Recycle001.svg/330px-Recycle001.svg.png",
    "https://upload.wikimedia.org/wikipedia/commons/thumb/6/60/Cat_silhouette.svg/330px-Cat_silhouette.svg.png"
  ]
}' |
apify call gazidev/image-vectorizer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gazidev/image-vectorizer"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/9cTQZkiV2WMziktwe/builds/46LCSWyiq6N6ZSRJs/openapi.json
