A move off Polotno usually starts with an iOS or Android app that needs a native editor rather than a WebView, or with server exports that don’t always match what users saw in the browser. Other teams stay on the web and want a fuller editor, with template locks finer than Polotno’s six flags and no React requirement.

The sections below cover when a move to IMG.LY SDK makes sense, how the two SDKs differ, a feature mapping, side-by-side code, a phased migration plan and a working script that converts a saved Polotno design into an IMG.LY SDK scene. They also spell out what doesn’t carry over, because some things don’t. Want numbers on what implementation looks like? Our impact report has them, based on more than 600 customers.

If you’re still comparing the two SDKs, start with our IMG.LY vs. Polotno comparison or the wider list of Polotno alternatives.

Checked against both SDKs as they stood in November 2026.

What the Move Takes, in Brief

Who this guide is for: The developers, product managers and technical leads who have to scope a move off a Polotno integration in production.

Why teams migrate: They need one or more of these:

  • Native editors on iOS and Android, rather than Polotno’s web editor wrapped in a WebView
  • Server renders from the editor’s own engine, video included, without a headless browser
  • About 25 permission scopes per element instead of six lock flags
  • A video timeline with multiple tracks and captions
  • Figma files opened as editable designs, and designs handed back to InDesign, Photoshop or Figma
  • Video clips, speech and sound effects generated in the web editor
  • An agent in your product that resizes, rebrands and localizes designs by calling the design tools in the CoDesign SDK, where a Polotno agent writes the design JSON itself
  • Editor customization from any web framework, without React

What changes: Both products are SDKs you host yourself, so this isn’t a move from someone else’s cloud to your own infrastructure. What changes is the foundation. You go from React components on a browser canvas, with designs you read as JSON, to a single cross-platform engine, with designs you reach through an API.

Migration complexity: Moderate, and it comes in two parts. Swapping the editor is the smaller job, and the median customer in our impact report had a production-ready editor in 14 days. For saved designs, there’s no one-click importer, but a Polotno design is documented JSON, so a script converts most of it. In our test on a sample design, a coding agent connected to CoDesign, IMG.LY’s free MCP server for design, rebuilt the shadow, stroke and line the script skips. You or the agent rebuild the rest, such as tables.

Key benefit: Editing on web, iOS, Android and desktop, rendering and automation on your servers and the CoDesign SDK’s design tools for agents all run on one engine and share one scene format. A template your designers build can open in your mobile app, be filled from data on your server and be resized by your agent, and it never needs converting along the way. In the web editor, AI plugins add generated images, video and audio to that same file.

When Polotno Stops Fitting Your Product

Plenty of Polotno users never need to move. These are the limits that usually push a team to look further:

You need a native mobile editor. Polotno is built for the web, and its docs point native apps to a WebView. That means you maintain the bridge between your app and the web editor yourself. If editing is a core part of your iOS or Android app, a WebView becomes a ceiling.

Server output has to match the editor. Polotno draws text with the browser’s own text engine, so results can differ between browsers, operating systems and server renders. On the server you choose between polotno-node, which drives headless Chromium through Puppeteer, and browser-free export packages that use renderers of their own. If a customer approves a design in the editor and prints something slightly different, that gap is your support ticket.

Your app isn’t built with React. Polotno is a React editor, and other frameworks mount React inside a host element. If your product runs on Vue, Angular or Svelte, you’re carrying a second framework for one feature.

Six lock flags aren’t enough. Polotno locks an element with six flags. Its draggable flag covers moving and rotating together, and styleEditable covers every style property at once. If your template authors need to allow one of those and not the other, you end up building the logic yourself.

Video has become a core feature. Polotno animates elements with enter, exit and loop presets and exports MP4. If your users need several video tracks, keyframes or captions on a timeline, you’ll hit the edge of what a page-based model offers.

Designs have to travel between your product and design tools. Polotno imports IDML, PowerPoint, PDF and SVG files, with Photoshop import in beta, and it reaches Figma through SVG. None of its exports is an InDesign, Photoshop or Figma file. If your customers’ designers want their work back in those tools, that half of the round trip is missing.

Your AI plans go beyond images and text. Polotno doesn’t generate video, speech or sound, so generated clips and voiceovers would be yours to build. Its AI image tools expand, fill, upscale and cut out images, its AI text tool drafts and rewrites copy, and an experimental API generates whole designs from a prompt.

You want an agent doing design work inside your product. Polotno’s approach is for the model to write Polotno JSON from its skills and schema, which your code then validates and renders. If you’d rather your agent work through ready-made design tools than write the design file itself, that’s how the CoDesign SDK works.

The more of these describe your product, the stronger the case for moving. If none apply and your users already have what they need, Polotno is a great fit for a web-only React app.

Weigh three more things before you commit: your backend reads or writes design JSON against Polotno’s documented schema, your templates depend on tables, or your template authors bind colors and visibility to data inside the editor. Each takes extra work in IMG.LY SDK, and we cover all three below.

What Comes with IMG.LY SDK

Switching to IMG.LY SDK changes what your product can offer on each platform:

Native SDKs on every platform. IMG.LY SDK runs in any web app, whatever its framework, natively on iOS and Android, in React Native and Flutter, on the desktop with Electron and macOS, and on Node.js servers. A template built on one platform opens on the others, minus any feature a platform doesn’t support.

One engine for editing and rendering. The same engine draws the design in the browser, in a native app and on your server. @cesdk/node runs that engine directly in Node.js, so a server render comes from the same code that drew the preview.

Granular template permissions. IMG.LY SDK controls editing through about 25 scopes per element, grouped by what they protect: text content, text style, fill, stroke, position, size, rotation, crop, effects, deletion and more. Roles decide who is bound by them. Template authors work in the Creator role and your end users in the Adopter role.

ImageBank X puts the editor inside its DAM. Its regional marketers personalize the templates there, while the house fonts and the logo’s position stay as the admins set them. In the words of Beck, one of its sales agents:

“It’s like handing them a sandbox with the rules baked in.”

A full video timeline. Video in IMG.LY SDK runs on a timeline with multiple tracks, keyframes and captions, with MP4 export from the browser or from your server. On iOS and Android, video editing runs natively in your app too.

Round trips with design tools. Importers turn PSD, Illustrator (AI), InDesign IDML, PowerPoint, PDF, EPS and Figma files into editable scenes, whether your code runs in a browser or on a server. Exporters write designs back out as IDML, layered PSD and Figma files, in both places. That matters when your customers’ designers still work in Adobe tools or Figma.

Generative AI and design agents. In the web editor, AI plugins generate text, images and video clips as well as speech and sound effects, with your own model or IMG.LY’s AI Gateway, and the native mobile editors generate images through the Gateway. With the CoDesign SDK, a separate IMG.LY product, the agent in your product gets design tools that run on your servers. Your agent calls them to fit a design to each channel, apply a new brand or translate it, in jobs that take a few minutes, and each result opens in the editor for your users to change.

A plugin architecture. Custom panels, asset sources, actions and AI features all attach through the same plugin interface, so your extensions live outside the editor’s core.

Glowtify didn’t come from Polotno, but it did move a tool it had built itself. Its carousel tool took one week to move onto IMG.LY SDK. That’s the closest comparison we can offer for how long a rebuild on IMG.LY SDK takes. Olivier Fradette-Roy, Glowtify’s CTO, put it this way:

“It’s been very easy to interact with the SDK and add value on top.”

The Glowtify case study covers the rest of their build, from the template library to standardizing on scene files.

Before You Start: Inventory Your Polotno Setup

Most surprises in a migration hide in your existing code and data, so take stock of both first. A coding agent can run most of these checks for you, with the two prompts at the end of this section.

What to Count in Your Code and Designs

Map every Store API touchpoint. Find each place your code calls store.toJSON(), store.loadJSON(), the export methods, store.on('change') and element.set(). These are the calls you’ll replace.

Count your saved designs by element type. Run through your stored JSON and tally the type of every element. Text, images, rectangles, circles and groups convert with the script below. Tables, lines and other shapes go on its list of elements to rebuild, and so do SVG, video, GIF and Lottie elements. Animations don’t carry over at all. Neither do styles such as shadows, strokes and filters, so count those too. Together, the counts tell you how much of your library converts automatically before you commit to anything.

Check for Base64 uploads. By default, Polotno turns a local upload, fonts included, into a Base64 string inside the design JSON, unless you configured upload functions. IMG.LY SDK doesn’t keep data: URIs in a saved scene unless you allow that scheme. We tested this, and the save fails with a disallowed-scheme error. Move those files to your own storage first and reference them by URL.

List every font. Collect each fontFamily and weight your designs use. Polotno stores Google Fonts by name only and leaves global fonts out of the JSON. IMG.LY SDK needs a font file for every font on your list.

Catalog your custom UI. Note each side panel section, toolbar component, translation and theme override you’ve built. You’ll rebuild these with IMG.LY SDK’s own UI APIs, so this list sets the size of that job.

What Else Depends on Polotno

Review your server rendering. Do you render with polotno-node, the browser-free export packages or Polotno’s Cloud Render API? With IMG.LY SDK you host rendering yourself, so plan a Node.js 22 service or a container.

Find code that edits design JSON. Any service that patches a stored design directly, such as swapping a text or an image URL in the JSON, needs to become engine calls or a template with variables.

List Polotno-hosted services. Polotno’s default side panel loads its stock photos, templates and font list through Polotno’s API. Its AI text tool runs there too, and so does its background removal unless you connected your own provider. Decide what replaces each one.

Decide on mobile. If native apps are the reason you’re moving, plan the iOS and Android integrations alongside the web swap so the template format is settled once.

Hand the Inventory to a Coding Agent

The first prompt goes to a coding agent in your repository. It audits your code without changing it, waits for your go, and then uses IMG.LY’s editor skill to set up IMG.LY SDK on a test route, with Polotno left in place. The second goes to an agent that can read your saved designs and only writes a report. Fill in its square brackets before you paste it.

Prompt for your codebase:

We're moving our app from Polotno SDK to IMG.LY SDK, in two parts.

Part 1, audit. Read the migration guide at
https://img.ly/blog/migrating-from-polotno-to-img-ly-sdk.md,
especially its feature-by-feature table. Then audit this
repository without changing any code, and write the results to
polotno-audit.md. For each finding, give the file and line, what
the code does and the IMG.LY SDK replacement the guide names.
Where the guide has no answer, look it up in the IMG.LY SDK docs
(https://img.ly/docs/cesdk/llms.txt) and name the page you used,
or write "no direct equivalent".

Cover:
1. Every import from polotno, @polotno/* and polotno-node.
2. Every call that saves, loads or exports a design (store.toJSON,
   store.loadJSON, store.saveAsImage, store.saveAsPDF,
   store.toDataURL and the other to...DataURL methods), listens
   for changes (store.on('change')) or adds and edits elements
   (page.addElement, element.set).
3. Editor customization: side panel sections, toolbar components,
   translations, theme overrides, setUploadFunc and every other
   import from polotno/config.
4. Server rendering: polotno-node, @polotno/image-export,
   @polotno/pdf-export, @polotno/video-export and requests to the
   Cloud Render API at api.polotno.com.
5. Code outside the editor that reads or patches design JSON, such
   as a service that swaps a text or an image URL.
6. Polotno-hosted services the app depends on: the default side
   panel's photos, templates and fonts, AI text and background
   removal. Also list the handlers that connect Polotno's other AI
   image tools to an AI provider.
7. Places where the editor runs inside a WebView, Electron or
   another native shell.

End with a table of each area, the number of places and a rough
effort (small, medium or large). Then stop and wait until I say
go.

Part 2, editor.
Add an IMG.LY editor to my app: https://img.ly/SKILL.md
Follow that skill. Put the editor on a test route, leave the
Polotno editor in place and save test designs apart from the
Polotno ones. Where the audit already answers one of the skill's
questions, such as the platform, the formats or the export
formats, use that answer and tell me it came from the audit.

Prompt for your saved designs:

We store our Polotno designs in [where: a database table, a
storage bucket, a folder of JSON exports]. Write and run a
read-only script that goes through [all of them, or a sample of N]
and writes polotno-design-audit.md. Don't modify, move or upload
any design.

Read the files against the JSON Schema in Polotno's
@polotno/schema package (design.schema.json), and count a field
only when its value differs from the schema's default. Report:
1. The number of designs, pages and elements, and the count of
   each element type (text, image, svg, line, figure, video, gif,
   lottie, table, group), with figures split by subType.
2. How many designs contain each of these, with a few example
   design IDs (or file names, where a design has no ID): tables,
   lines, figures other than rect and circle, text with inline
   HTML formatting such as <strong>, enter, exit or loop
   animations, text overflow set to fit or ellipsis, a maxLines
   value, bindings on any element, and {{tokens}} in text.
3. The same for what the conversion script in Phase 1 of the
   migration guide
   (https://img.ly/blog/migrating-from-polotno-to-img-ly-sdk.md)
   doesn't carry over: strokes and borders, shadows, blur and
   color filters, flipped images, image masks (clipSrc), stretched
   images (stretchEnabled), rounded image corners, blend modes,
   text backgrounds, curved text, text decoration, text
   transforms, text padding, line height set to auto, vertical
   alignment other than top, elements hidden from export
   (showInExport: false), elements kept on top (alwaysOnTop),
   colors other than hex, rgb() or rgba() without percentages, or
   the names black, white and transparent (gradients count), page
   background images, bleed and audio tracks.
4. Every image, video, SVG, audio, Lottie or font source that is
   a data: URI, with the design IDs and their total size.
5. Every font family and weight in use (treat bold as 700 and
   normal as 400), how many designs use each, and which ones come
   from a design's own fonts list, from Google Fonts or from
   neither, such as global fonts the app registers in code.
6. Designs with no schemaVersion, which Polotno upgrades when it
   opens them.
7. How often each lock flag is set to false: selectable,
   draggable, contentEditable, styleEditable, resizable,
   removable. Also count the deprecated locked flag set to true.

End with the share of designs made only of text, images,
rectangles, circles and groups that have none of the items in
points 2 to 4 apart from bindings and {{tokens}}. The Phase 1
script converts those in full once their fonts are hosted. Their
bindings then need setting up again, as variable bindings or in
your own code.

How Polotno and IMG.LY SDK Differ Underneath

The two SDKs are built around different ideas, and that difference explains most of the steps below, including the few things that don’t translate.

Polotno: React Components on a Browser Canvas

Polotno is a set of React components around a canvas, driven by a state store. In practice, integrating it means:

  • Initialization: You call createStore() with your API key and compose the editor from React components
  • Rendering: The canvas is drawn in the browser, and text is laid out by the browser’s text engine
  • State: The design lives in an observable store that you read and change directly
  • Design data: A design is JSON with a published schema, so any service can read and write it
  • Server rendering: polotno-node drives headless Chromium, and separate packages export images and PDF without a browser
  • Platforms: Web, with a WebView for native apps

It suits web teams who want a familiar React integration and full access to the design as data. The tradeoff is that text rendering depends on the environment it runs in, and native apps get the editor through a WebView.

IMG.LY SDK: One Engine on Every Surface

IMG.LY SDK is an engine with an editor on top. Working with it means:

  • Initialization: You create an editor instance, or just the engine if you don’t need a UI
  • Rendering: The SDK ships its own C++ engine, which lays out and draws everything, text included, on every platform
  • State: The design is a scene made of blocks, which you query and change through the engine API
  • Design data: A scene is saved as an encoded string or an archive that you treat as opaque
  • Server rendering: @cesdk/node runs the same engine in Node.js
  • Platforms: Web, native iOS and Android, React Native, Flutter, desktop and server

This model gives you consistent output and one template format everywhere. What you give up is a documented design file you can read, diff and patch directly.

What Shifts

Here’s how the main pieces compare:

AspectPolotnoIMG.LY SDK
RenderingBrowser canvas and browser text engineOne engine on every platform
Design dataDocumented JSON you can edit directlyOpaque scene, changed through the API
Editor UIReact components you composeA configured editor, or your own UI on the engine
Template permissionsSix lock flagsAbout 25 scopes, enforced by role
Server renderingHeadless Chromium, or separate export packagesThe editor’s engine in Node.js
MobileWebViewNative SDKs
UnitsPixels, with DPI applied on exportPixels, millimeters or inches per scene
HostingYour infrastructureYour infrastructure

This shift is why migration takes more than swapping function names. You’re changing how a design is stored and where it’s rendered.

Polotno to IMG.LY SDK, Feature by Feature

Each row pairs a Polotno feature with what replaces it in IMG.LY SDK and what to watch for. Keep it open while you port your integration.

Polotno FeatureIMG.LY SDK EquivalentImplementation Notes
createStore() and the storeCreativeEditorSDK.create() and cesdk.engineThe engine API is the same in the editor, in a headless browser and in Node.js.
PolotnoContainer, SidePanel, Toolbar, WorkspaceOne editor instance with a starter kit configurationYou configure the editor’s areas. On React, Vue and Angular you mount it with an official wrapper component.
store.toJSON() and store.loadJSON()engine.scene.saveToString() and engine.scene.loadFromString()The scene is an encoded string, not JSON. Use saveToArchive() to bundle images and fonts.
Pages with childrenPages with child blocksBoth store elements back to front, so layer order carries over, except for Polotno elements set to alwaysOnTop.
x, y, width, height in pixelsPosition and size in the scene’s design unitWith the Pixel unit, values carry over unchanged.
dpi on the design (72 by default)scene/dpi (300 by default)Carry the value over, or your PDFs change size.
rotation in degrees around the top-left cornersetRotation() in radians around the centerBoth store where the top-left corner ends up, so set the rotation before the position. The direction is the same.
text elementText blockPass the Pixel unit when you set the font size. Polotno’s line height multiplies the font size and IMG.LY SDK’s the font’s own line height, so convert it. Height follows the content in both editors, while Polotno’s server renders shrink the font to fit the box by default.
Rich text stored as HTMLText styled by character rangeReapply inline bold, italics and colors with range-based calls.
fontFamily names and store.addFont()Typefaces that list their font filesEvery font needs a file URL, Google Fonts included. TTF, OTF, WOFF and WOFF2 are supported.
image element with crop fractionsGraphic block with an image fill, crop scale and crop translationBy default, Polotno draws the crop at the frame’s shape, from its top-left corner, without stretching the image. Work out the scale once the image has loaded, as the script below does.
figure element with a subTypeGraphic block with a shape and a color fillrect and circle map directly. IMG.LY SDK also has star, polygon and line shapes, which the script below leaves to you. Other outlines need a vector path.
groupGroup blockAn IMG.LY SDK group has its own position and size.
{{name}} tokens and the variables list{{name}} text variables and engine.variable.setString()Tokens carry over unchanged, including dotted names such as {{user.city}}.
bindings for src, fill, visibleImage and color variables bound with engine.block.setVariableBinding(), and placeholders for images users replaceThe script lists each binding for you to set up again. Image and color bindings then live in the template. Visibility has no variable type, so your code hides those blocks by name.
Six lock flagsScopes on each blockBlocks created through the API start with every scope off. Enable them all, then remove the locked ones.
store.setRole() with admin, user, viewerengine.editor.setRole() with Creator, Adopter, ViewerSame idea, new names. Polotno’s user role still shows the Lock button.
Side panel sectionscesdk.ui.registerPanel() and asset library entriesPanels are built with a builder API, not React components.
Brand Kit side panelAsset sources for your brand’s colors, fonts and images, and scopes that lock elements such as the logoYour asset sources replace the default libraries, as the brand guidelines guide shows.
Toolbar componentsThe Component Order APIYou insert, reorder or remove items by ID.
setUploadFunc()The uploadFile actionOne function that stores the file and returns the asset.
store.on('change')engine.editor.onHistoryUpdatedWithKind()Fires when the undo history changes, which suits autosave and unsaved-changes checks.
store.saveAsImage() and store.saveAsPDF()engine.block.export() with a MIME typeOne call for PNG, JPEG, WebP and PDF. It returns a Blob you download or upload.
@polotno/pdf-export with pdfxPDF export with outputColorSpace: 'CMYK', plus @imgly/pdfx-exporterCMYK and spot colors are part of the PDF export. PDF/X comes from a separate package.
polotno-node and @polotno/image-export@cesdk/nodeThe editor’s engine, with no browser to run. Needs Node.js 22 or newer, and exports MP4 where its native engine runs: macOS, Windows x64 and Linux with glibc 2.39 or newer.
Cloud Render API@cesdk/node or the CE.SDK Renderer on your infrastructureYou host the rendering. The Renderer is a Docker container for high-volume jobs.
Real-time collaborationNot built-inPolotno offers a demo and leaves conflict handling to you. IMG.LY SDK doesn’t include collaboration either.

The Same Tasks in Both APIs

Mounting the editor:

// Polotno
import { PolotnoContainer, SidePanelWrap, WorkspaceWrap } from 'polotno';
import { Toolbar } from 'polotno/toolbar/toolbar';
import { SidePanel } from 'polotno/side-panel';
import { Workspace } from 'polotno/canvas/workspace';
import { createStore } from 'polotno/model/store';
import 'polotno/ui.css';

const store = createStore({ key: 'YOUR_API_KEY', showCredit: true });
store.addPage();

export const Editor = () => (
  <PolotnoContainer style={{ width: '100vw', height: '100vh' }}>
    <SidePanelWrap>
      <SidePanel store={store} />
    </SidePanelWrap>
    <WorkspaceWrap>
      <Toolbar store={store} />
      <Workspace store={store} />
    </WorkspaceWrap>
  </PolotnoContainer>
);

// IMG.LY SDK
import CreativeEditor from '@cesdk/cesdk-js/react';
import { initDesignEditor } from '../imgly'; // copied from the design editor starter kit

export const Editor = () => (
  <CreativeEditor
    config={{ baseURL: '/assets' }}
    init={async (cesdk) => {
      await initDesignEditor(cesdk); // editor UI from the design editor starter kit
      await cesdk.actions.run('scene.create');
    }}
    width="100vw"
    height="100vh"
  />
);

baseURL: '/assets' expects IMG.LY SDK’s asset bundle in your public folder, as the starter kit guide describes. For a quick test you can point it at https://cdn.img.ly/packages/imgly/cesdk-js/1.87.0/assets, which IMG.LY provides for development and prototyping.

Without a license key, IMG.LY SDK works in evaluation mode and puts a watermark on every export. You can get started without signing up and add a key when you’re ready.

Saving and loading a design:

// Polotno: save the JSON a second after the last change
let timeout = null;
store.on('change', () => {
  clearTimeout(timeout);
  timeout = setTimeout(() => {
    fetch('https://example.com/designs', {
      method: 'POST',
      body: JSON.stringify(store.toJSON()),
    });
  }, 1000);
});
store.loadJSON(savedJson);

// IMG.LY SDK
let timeout = null;
cesdk.engine.editor.onHistoryUpdatedWithKind(() => {
  clearTimeout(timeout);
  timeout = setTimeout(async () => {
    const scene = await cesdk.engine.scene.saveToString();
    fetch('https://example.com/designs', { method: 'POST', body: scene });
  }, 1000);
});
await cesdk.engine.scene.loadFromString(savedScene);

Exporting a design:

// Polotno
await store.saveAsImage({ fileName: 'design.png', pixelRatio: 2 });
await store.saveAsPDF({ fileName: 'design.pdf' });

// IMG.LY SDK
const page = cesdk.engine.scene.getCurrentPage();
const png = await cesdk.engine.block.export(page, {
  mimeType: 'image/png',
  // Converted scenes measure in pixels, so this doubles the size like pixelRatio: 2
  targetWidth: cesdk.engine.block.getWidth(page) * 2,
});
const pdf = await cesdk.engine.block.export(page, {
  mimeType: 'application/pdf',
});

Setting dynamic content:

// Polotno: fill a copy of the template and open it.
// store.setVariables() updates the open template instead, replacing its variable list.
import { resolveVariables } from '@polotno/schema/variables';

const { design } = resolveVariables(template, {
  first_name: 'Ada',
  user: { city: 'London' },
});
store.loadJSON(design);

// IMG.LY SDK
cesdk.engine.variable.setString('first_name', 'Ada');
cesdk.engine.variable.setString('user.city', 'London');

Locking an element:

// Polotno: users can retype the headline but can't move, rotate, resize or restyle it,
// though the toolbar's Lock button can remove those locks
element.set({
  contentEditable: true,
  styleEditable: false,
  draggable: false,
  resizable: false,
});
store.setRole('user');

// IMG.LY SDK
const [headline] = cesdk.engine.block.findByName('headline');
// Turn every scope off, deleting included, then allow selecting and retyping
for (const scope of cesdk.engine.editor.findAllScopes()) {
  cesdk.engine.block.setScopeEnabled(
    headline,
    scope,
    ['editor/select', 'text/edit'].includes(scope)
  );
}
cesdk.engine.editor.setRole('Adopter');

Gaps to Plan For

A few Polotno features have no direct IMG.LY SDK equivalent, and each needs a decision or some custom work:

Hand-editable design files: An IMG.LY SDK scene is an encoded string you treat as opaque. Code that patches Polotno JSON becomes engine calls, or a template with variables. To diff two scenes in a pull request, you have to save them uncompressed and decode them first.

Inline text formatting: Polotno stores rich text as HTML. A conversion script keeps the words and drops the tags, so a bold word inside a regular sentence has to be restyled by character range.

Color and visibility bindings: Nothing in IMG.LY SDK binds to visibility, so to hide a badge per record, your script finds the block by name and hides it. Color, number, image and typeface variables bind to block properties with engine.block.setVariableBinding(), which lets a recolor or a photo swap live in the template. Template authors who bind colors in Polotno’s Variables panel set those bindings up in code.

Tables: IMG.LY SDK’s block types don’t include a table. Rebuild tables from text blocks and shapes. The conversion script lists every table it skips.

Custom shapes: Polotno ships more than 80 figure types. Blobs and other custom outlines need a vector path in IMG.LY SDK. The script also skips SVG elements. IMG.LY SDK can import SVG markup as editable shapes, but apply each element’s colorsReplace map to the markup first, or the original colors come back. Image masks need a second look.

Text overflow rules: Polotno’s overflow settings only partly carry over. Its fit mode, bounded by minFontSize and maxFontSize, has a close match in IMG.LY SDK’s automatic font size, which takes a minimum and a maximum too. maxLines and the ellipsis mode have no counterpart, so review the templates that use them. The saved-designs prompt above counts them and names a few examples.

Pixel-identical text: The two engines measure fonts differently, so a line can break one word earlier or later. Compare every converted template with its Polotno export.

Animations: Enter, exit and loop presets exist on both sides under different names, so map them yourself or have your coding agent add the mapping to the conversion script. Polotno counts time in milliseconds and IMG.LY SDK in seconds.

Custom React UI: Side panel sections and toolbar components don’t port. You rebuild them as custom panels and reorder the built-in UI with the Component Order API.

Planning the Move in Phases

Three phases keep your product stable while you move: prove IMG.LY SDK on one design, convert your library, then swap the editor.

Phase 1: Open One Real Design in IMG.LY SDK

Goal: A test setup of IMG.LY SDK that opens your most important design.

Step 1: Start in evaluation mode

  • Run IMG.LY SDK without a license key, since evaluation mode needs no sign-up and watermarks exports
  • Pick a setup route on the Get Started page: the docs, with a step-by-step guide for each web, mobile, desktop and server platform, or a coding agent
  • With a coding agent, paste the one-line prompt in Step 2, or install IMG.LY’s agent skills, which give it the current docs plus skills that explain the SDK and build with it
  • Once the editor runs, the one-line prompt offers to install the agent skills, except in React Native and Flutter apps
  • The Get Started page has setup guides for Claude Code, Codex, Cursor and other agents
  • Talk to our team when you want a trial key or have licensing questions

Step 2: Set up the editor with a coding agent

If you ran the codebase prompt above, its second part covers this step. Otherwise, paste this line into the coding agent you use in your repository:

Add an IMG.LY editor to my app: https://img.ly/SKILL.md
  • The agent asks what your users make and where designs are saved, then recommends a starter kit, most with a demo you can try first
  • It shows each command before running it and builds nothing until you approve its plan
  • It works in web apps, Electron and native or cross-platform mobile apps, so the same line covers your iOS and Android plans
  • Ask it to mount the editor in a test route and save test designs apart from your Polotno ones, then confirm the editor loads, renders and exports
  • Without a coding agent, install it with npm install @cesdk/cesdk-js and take the setup from the design editor starter kit

Step 3: Convert one real design

  • Pick the template your users open most and save its JSON as design.json
  • Install the packages the script below uses with npm install @cesdk/node @polotno/schema, on Node.js 22 or newer
  • Save the script’s three parts, in order, as convert.mjs next to design.json, and run node convert.mjs
  • Compare the design.png preview it writes with your Polotno export, then open design.scene in your test editor with cesdk.engine.scene.loadFromString()

We wrote and tested the script against a sample design: a 1080×1080 promo saved with store.toJSON(), with a cropped photo, a headline with a {{first_name}} token, a rotated offer on a circle, a logo group that users can’t select and a line.

The Polotno design, trimmed to the fields the script reads:

{
  "schemaVersion": 6,
  "width": 1080,
  "height": 1080,
  "unit": "px",
  "dpi": 72,
  "fonts": [],
  "variables": [
    { "name": "first_name", "value": "Ada" },
    { "name": "discount", "value": "20%" }
  ],
  "pages": [
    {
      "id": "page-1",
      "background": "#1d3557",
      "children": [
        {
          "id": "photo",
          "type": "image",
          "name": "photo",
          "x": 540,
          "y": 0,
          "width": 540,
          "height": 1080,
          "src": "https://img.ly/static/ubq_samples/sample_1.jpg",
          "cropX": 0.25,
          "cropY": 0,
          "cropWidth": 0.5,
          "cropHeight": 1,
          "bindings": { "src": "photo" }
        },
        {
          "id": "headline",
          "type": "text",
          "name": "headline",
          "x": 60,
          "y": 180,
          "width": 440,
          "height": 230,
          "text": "<p>Welcome back, <strong>{{first_name}}</strong></p>",
          "fontSize": 72,
          "fontFamily": "Roboto",
          "fontWeight": "bold",
          "fill": "#ffffff",
          "align": "left",
          "lineHeight": 1.1,
          "styleEditable": false,
          "draggable": false,
          "resizable": false
        },
        {
          "id": "offer-badge",
          "type": "figure",
          "subType": "circle",
          "name": "offer-badge",
          "x": 120,
          "y": 600,
          "width": 300,
          "height": 300,
          "rotation": -12,
          "fill": "#e63946"
        },
        {
          "id": "offer",
          "type": "text",
          "name": "offer",
          "x": 140,
          "y": 720,
          "width": 260,
          "height": 70,
          "rotation": -12,
          "text": "{{discount}} off",
          "fontSize": 56,
          "fontFamily": "Roboto",
          "fontWeight": "700",
          "fill": "#ffffff",
          "align": "center"
        },
        {
          "id": "logo",
          "type": "group",
          "name": "logo",
          "selectable": false,
          "children": [
            {
              "id": "logo-bg",
              "type": "figure",
              "subType": "rect",
              "name": "logo-bg",
              "x": 60,
              "y": 60,
              "width": 200,
              "height": 60,
              "fill": "#ffffff",
              "cornerRadius": 12
            },
            {
              "id": "logo-text",
              "type": "text",
              "name": "logo-text",
              "x": 60,
              "y": 72,
              "width": 200,
              "height": 40,
              "text": "ACME",
              "fontSize": 32,
              "fontFamily": "Roboto",
              "fontWeight": "bold",
              "fill": "#1d3557",
              "align": "center"
            }
          ]
        },
        {
          "id": "rule",
          "type": "line",
          "name": "rule",
          "x": 60,
          "y": 440,
          "width": 400,
          "height": 4,
          "color": "#ffffff"
        }
      ]
    }
  ]
}

IMG.LY SDK conversion script, part 1: fonts, locks and helpers

import fs from 'fs/promises';
import CreativeEngine from '@cesdk/node';
import { migrateDesign } from '@polotno/schema';

// Polotno upgrades designs saved in an older format when it opens them, so do the same first
const design = migrateDesign(
  JSON.parse(await fs.readFile('./design.json', 'utf8'))
);

// Polotno writes font weights as 'normal', 'bold' or a number such as '700'. IMG.LY SDK names them.
const WEIGHTS = {
  100: 'thin',
  200: 'extraLight',
  300: 'light',
  400: 'normal',
  500: 'medium',
  600: 'semiBold',
  700: 'bold',
  800: 'extraBold',
  900: 'heavy',
};
const weightOf = (weight = 'normal') => WEIGHTS[weight] ?? weight;

// Polotno saves Google Fonts by family name only, so list the font files here.
// Fonts added with store.addFont() carry their own URLs in the JSON, in url or per style in styles.
// Global fonts registered with addGlobalFont() aren't in the JSON, so list those here too.
const FONTS = 'https://cdn.img.ly/assets/v4/ly.img.typeface/fonts'; // swap for your own font hosting
const typefaces = {
  Roboto: {
    name: 'Roboto',
    fonts: [
      {
        uri: `${FONTS}/Roboto/Roboto-Regular.ttf`,
        subFamily: 'Regular',
        weight: 'normal',
        style: 'normal',
      },
      {
        uri: `${FONTS}/Roboto/Roboto-Bold.ttf`,
        subFamily: 'Bold',
        weight: 'bold',
        style: 'normal',
      },
    ],
  },
};
for (const { fontFamily, url, styles } of design.fonts ?? []) {
  const variants = styles?.length ? styles : url ? [{ src: url }] : [];
  if (variants.length) {
    typefaces[fontFamily] = {
      name: fontFamily,
      fonts: variants.map(({ src, fontWeight, fontStyle = 'normal' }) => ({
        uri: src.replace(/^url\(\s*["']?|["']?\s*\)$/g, ''), // styles wrap it in url("…")
        subFamily: `${weightOf(fontWeight)} ${fontStyle}`,
        weight: weightOf(fontWeight),
        style: fontStyle,
      })),
    };
  }
}

// The scopes each Polotno lock flag takes away when it is false.
// Polotno shows its effects and animation pickers only for content-editable elements.
const EFFECTS = [
  'appearance/adjustments',
  'appearance/filter',
  'appearance/effect',
  'appearance/blur',
  'appearance/shadow',
];
const STYLE = [
  'text/character',
  'fill/changeType',
  'stroke/change',
  'shape/change',
  'layer/flip',
  'layer/opacity',
  'layer/blendMode',
  ...EFFECTS,
];
const locksFor = (type) => ({
  selectable: ['editor/select'],
  draggable: ['layer/move', 'layer/rotate'],
  resizable: ['layer/resize'],
  removable: ['lifecycle/destroy'],
  // Replacing an image is a content change, recoloring text or a shape is a style change
  contentEditable: [
    ...(type === 'image' ? ['fill/change', 'layer/crop'] : ['text/edit']),
    ...EFFECTS,
    'appearance/animation',
  ],
  styleEditable: type === 'image' ? STYLE : [...STYLE, 'fill/change'],
});

// Polotno stores rich text as HTML. This keeps the words and line breaks and drops inline styles.
const plainText = (html) =>
  html
    .replace(/<\/p>\s*<p[^>]*>|<br\s*\/?>/g, '\n')
    .replace(/<[^>]+>/g, '')
    .replace(/&nbsp;/g, ' ')
    .replace(/&lt;/g, '<')
    .replace(/&gt;/g, '>')
    .replace(/&quot;/g, '"')
    .replace(/&#39;/g, "'")
    .replace(/&amp;/g, '&');

// Reads #rgb, #rrggbb, #rrggbbaa, rgb() and rgba() without percentages, and the names below. Polotno's default text fill is 'black'.
// Anything else, such as a gradient or another color name, returns undefined and goes on the Not converted list.
const NAMED = { black: '#000000', white: '#ffffff', transparent: '#00000000' };
function toColor(css) {
  css = NAMED[css.trim().toLowerCase()] ?? css.trim();
  const rgb = css.match(/^rgba?\(([^)]+)\)$/);
  if (rgb) {
    const [r, g, b, a = 1] = rgb[1]
      .trim()
      .split(/[\s,/]+/)
      .map(Number);
    const color = { r: r / 255, g: g / 255, b: b / 255, a };
    // Percentages and values out of range go on the Not converted list too
    return Object.values(color).every((v) => v >= 0 && v <= 1)
      ? color
      : undefined;
  }
  let hex = css.replace('#', '');
  if (hex.length === 3) hex = [...hex].map((c) => c + c).join('');
  if (!/^([0-9a-f]{6}|[0-9a-f]{8})$/i.test(hex)) return undefined;
  const channel = (i) => parseInt(hex.slice(i, i + 2), 16) / 255;
  return {
    r: channel(0),
    g: channel(2),
    b: channel(4),
    a: hex.length === 8 ? channel(6) : 1,
  };
}

// An empty license runs in evaluation mode and watermarks exports
const engine = await CreativeEngine.init({
  license: process.env.CESDK_LICENSE ?? '',
});
const { block } = engine;
const skipped = [];
const crops = [];
const bindings = [];

// Polotno's lineHeight multiplies the font size, IMG.LY SDK's multiplies the font's own line height
const fontLineHeight = new Map();
for (const { fonts } of Object.values(typefaces)) {
  for (const { uri } of fonts) {
    const { ascender, descender, lineGap, unitsPerEm } =
      await engine.editor.getFontMetrics(uri);
    fontLineHeight.set(uri, (ascender - descender + lineGap) / unitsPerEm);
  }
}

Part 2: one Polotno element becomes one block

function convert(el, page) {
  // Older designs can carry Polotno's deprecated locked flag. Polotno reads it on elements, not groups, as five flags set to false
  if (el.locked && el.type !== 'group') {
    el = {
      ...el,
      draggable: false,
      contentEditable: false,
      styleEditable: false,
      resizable: false,
      removable: false,
    };
  }
  // Polotno binds src, fill and visible to variables. The script lists each binding for you to set up again.
  for (const [property, variable] of Object.entries(el.bindings ?? {}))
    bindings.push({ element: el.id, property, variable });
  const angle = ((el.rotation ?? 0) * Math.PI) / 180;
  if (el.type === 'group') {
    // Polotno groups have no position of their own, so convert the children and group them.
    // Polotno keeps a group's select and delete locks on the group, so pass them down to the children.
    const inherit = (child) => ({
      ...child,
      selectable: el.selectable === false ? false : child.selectable,
      removable: el.removable === false ? false : child.removable,
    });
    const ids = el.children
      .map((child) => convert(inherit(child), page))
      .filter(Boolean);
    if (ids.length < 2) return ids[0];
    const group = block.group(ids);
    block.setName(group, el.name || el.id);
    block.setOpacity(group, el.opacity ?? 1);
    block.setVisible(group, el.visible ?? true);
    // The group allows what all of its children allow
    for (const scope of engine.editor.findAllScopes()) {
      block.setScopeEnabled(
        group,
        scope,
        ids.every((child) => block.isScopeEnabled(child, scope))
      );
    }
    return group;
  }

  let id;
  if (el.type === 'text') {
    id = block.create('text');
    block.replaceText(id, plainText(el.text));
    const typeface = typefaces[el.fontFamily];
    const weight = weightOf(el.fontWeight);
    const font = typeface?.fonts.find(
      (f) => f.weight === weight && f.style === (el.fontStyle ?? 'normal')
    );
    if (font) block.setFont(id, font.uri, typeface);
    else skipped.push(`font "${el.fontFamily}" ${weight} on ${el.id}`);
    block.setTextFontSize(id, el.fontSize, { unit: 'Pixel' });
    const color = toColor(el.fill ?? 'black');
    if (color) block.setTextColor(id, color);
    else skipped.push(`color "${el.fill}" on ${el.id}`);
    const align = {
      left: 'Left',
      center: 'Center',
      right: 'Right',
      justify: 'Justify',
    }[el.align];
    if (align) block.setEnum(id, 'text/horizontalAlignment', align);
    if (font) {
      // Polotno's lineHeight is a number or a string such as '1.5' or '150%'.
      // The script reads anything else, 'auto' included, as Polotno's default of 1.2
      const match = String(el.lineHeight)
        .trim()
        .match(/^(-?\d*\.?\d+)(%?)$/);
      const lineHeight =
        (match && parseFloat(match[1]) / (match[2] ? 100 : 1)) || 1.2;
      block.setFloat(
        id,
        'text/lineHeight',
        lineHeight / fontLineHeight.get(font.uri)
      );
      // Polotno centers the first line in its line height, IMG.LY SDK starts it at the top
      const shift =
        (el.fontSize * (lineHeight - fontLineHeight.get(font.uri))) / 2;
      el = {
        ...el,
        x: el.x - shift * Math.sin(angle),
        y: el.y + shift * Math.cos(angle),
      };
    }
    if (el.letterSpacing)
      block.setFloat(id, 'text/letterSpacing', el.letterSpacing);
  } else if (el.type === 'image') {
    id = block.create('graphic');
    block.setShape(id, block.createShape('rect'));
    const fill = block.createFill('image');
    block.setString(fill, 'fill/image/imageFileURI', el.src);
    block.setFill(id, fill);
  } else if (el.type === 'figure' && ['rect', 'circle'].includes(el.subType)) {
    id = block.create('graphic');
    const shape = block.createShape(el.subType === 'rect' ? 'rect' : 'ellipse');
    block.setShape(id, shape);
    if (el.cornerRadius) {
      for (const corner of ['TL', 'TR', 'BL', 'BR'])
        block.setFloat(
          shape,
          `shape/rect/cornerRadius${corner}`,
          el.cornerRadius
        );
    }
    const fill = block.createFill('color');
    // Polotno's default figure fill is a blue
    const color = toColor(el.fill ?? 'rgb(0, 161, 255)');
    if (color) block.setColor(fill, 'fill/color/value', color);
    else skipped.push(`color "${el.fill}" on ${el.id}`);
    block.setFill(id, fill);
  } else {
    skipped.push(`${el.type}${el.subType ? `/${el.subType}` : ''} ${el.id}`);
    return undefined;
  }
  block.appendChild(page, id);

  block.setWidth(id, el.width);
  if (el.type === 'text') block.setHeightMode(id, 'Auto');
  else block.setHeight(id, el.height);
  // Polotno rotates around the top-left corner, IMG.LY SDK around the center.
  // Both store where that corner ends up, so rotate first and then place the corner.
  block.setRotation(id, angle);
  block.setPositionX(id, el.x);
  block.setPositionY(id, el.y);
  block.setOpacity(id, el.opacity ?? 1);
  block.setVisible(id, el.visible ?? true);
  block.setName(id, el.name || el.id);

  // Polotno either fits the image to the frame or crops it by fractions of the source image
  if (el.type === 'image' && el.fit) {
    block.setContentFillMode(id, el.fit === 'contain' ? 'Contain' : 'Cover');
  } else if (el.type === 'image' && el.cropWidth) {
    crops.push([id, el]); // set once the image has loaded, below
  }

  // Blocks created through the API start with every scope off. Turn them all on, except the locked ones.
  const locked = Object.entries(locksFor(el.type)).flatMap(([flag, scopes]) =>
    el[flag] === false ? scopes : []
  );
  for (const scope of engine.editor.findAllScopes()) {
    block.setScopeEnabled(id, scope, !locked.includes(scope));
  }
  return id;
}

Part 3: build the scene and save it

try {
  const scene = engine.scene.create('VerticalStack', { designUnit: 'Pixel' });
  // The iOS and Android editors need the scene's mode to open it
  block.setEnum(scene, 'scene/mode', 'Design');
  // Polotno turns pixels into PDF points through the design's dpi, so carry it over
  block.setFloat(scene, 'scene/dpi', design.dpi ?? 72);
  const [stack] = block.findByType('stack');

  for (const source of design.pages) {
    const page = block.create('page');
    block.setWidth(
      page,
      typeof source.width === 'number' ? source.width : design.width
    );
    block.setHeight(
      page,
      typeof source.height === 'number' ? source.height : design.height
    );
    block.appendChild(stack, page);
    // A background toColor can't read, such as an image, goes on the Not converted list
    const background = toColor(source.background ?? 'white');
    if (background)
      block.setColor(block.getFill(page), 'fill/color/value', background);
    else skipped.push(`background "${source.background}" on ${source.id}`);
    // Children are stored back to front, which is also IMG.LY SDK's order
    for (const el of source.children) convert(el, page);
  }

  // Unless stretchEnabled is on, Polotno shows a crop at the frame's shape, starting from the crop's top-left corner.
  // In Cover mode, the ratio of the two crop scales is the image's shape over the frame's.
  await block.forceLoadResources(crops.map(([id]) => id));
  for (const [id, el] of crops) {
    block.setContentFillMode(id, 'Cover');
    const ratio = block.getCropScaleX(id) / block.getCropScaleY(id);
    const height = Math.min(el.cropHeight, el.cropWidth * ratio);
    const width = height / ratio;
    block.setContentFillMode(id, 'Crop');
    block.setCropScaleX(id, 1 / width);
    block.setCropScaleY(id, 1 / height);
    block.setCropTranslationX(id, -el.cropX / width);
    block.setCropTranslationY(id, -el.cropY / height);
  }

  // {{tokens}} in text carry over unchanged, so only the values need setting.
  // Variables that bindings use are left out: a text variable would block an image or color one of the same name.
  const bound = new Set(bindings.map(({ variable }) => variable));
  for (const variable of design.variables ?? []) {
    if (bound.has(variable.name)) continue;
    engine.variable.setString(
      variable.name,
      String(variable.value ?? variable.default ?? '')
    );
  }

  await fs.writeFile('./design.scene', await engine.scene.saveToString());
  const [firstPage] = block.findByType('page');
  const png = await block.export(firstPage, { mimeType: 'image/png' });
  await fs.writeFile('./design.png', Buffer.from(await png.arrayBuffer()));
  if (skipped.length) console.log('Not converted:', skipped);
  if (bindings.length) console.log('Set up these bindings again:', bindings);
} finally {
  engine.dispose();
}

Key differences:

  • Polotno upgrades a design saved in an older format when it opens it, which changes how some values, letter spacing among them, are read. The script runs that upgrade with migrateDesign before it converts anything. It also reads the deprecated locked flag on an element the way Polotno does, as five lock flags set to false
  • Polotno rotates an element around its top-left corner and IMG.LY SDK around its center. Both store where that corner ends up, so the script sets the rotation first and the position after it
  • Polotno’s fontSize is in pixels, so the script passes the Pixel unit explicitly. Polotno’s lineHeight multiplies the font size, while IMG.LY SDK’s scales the line height set in the font file. The script converts it with the font’s metrics and moves the text to where Polotno draws the first line
  • Polotno describes a crop as fractions of the source image and by default draws it at the frame’s shape without stretching the image, while IMG.LY SDK scales and shifts the image inside its frame. The script loads each cropped image to read its shape before it sets the crop. Images that use Polotno’s fit setting map to IMG.LY SDK’s Cover and Contain modes
  • A Polotno group has no position of its own, so its children already hold page coordinates. Polotno keeps a group’s select and delete locks on the group itself, so the script passes them down to its children
  • A block created through the API starts with every scope off, so the script turns them all on and then removes the ones a Polotno flag locks
  • Polotno maps one pixel to one PDF point at 72 DPI. Without the DPI line, a 1080-pixel page exports as a 259-point PDF

What the script reports:

  • For the sample, it writes design.scene and a design.png preview, prints Not converted: [ 'line rule' ] and lists the photo’s src binding under Set up these bindings again
  • It keeps the text and drops inline HTML, so the headline’s <strong> tag disappears
  • It doesn’t carry over styles such as strokes, shadows, filters, flips, image masks, stretched images, rounded image corners, blend modes and text backgrounds, or bleed and audio tracks, and doesn’t list them either. Elements that Polotno hides from export or keeps on top become ordinary layers. The saved-designs prompt counts the designs that use any of these
  • It maps Polotno’s fit setting to IMG.LY SDK’s Cover and Contain modes and ignores focus, so check images where the focus point mattered
  • It reads hex colors, rgb() and rgba() values without percentages, and the names black, white and transparent. Other colors, gradients and page background images go on the Not converted list
  • It reads a lineHeight of 'auto' as Polotno’s default of 1.2, so check those text boxes
  • It lists each binding rather than converting it, and leaves the variables those bindings use out of the scene. Create them as image or color variables, bind them with engine.block.setVariableBinding() and hide blocks for visibility in your own code. Until then, a bound element keeps its saved src, fill and visible values. In the converted scene, text that uses one of those variables as a {{token}} shows the token itself
  • Tokens that aren’t in the design’s variables list get no value, so set them before you export
  • Pages keep their scopes off, so Adopters can’t change a page’s background or size. Turn those scopes on if your users could do that in Polotno

We rendered the sample design with polotno-node and with this script, and apart from the line it skips, the photo crop, the text and the shapes land in the same places. Convert one rotated, cropped design of your own first and put it next to your Polotno export before you run a whole library through it.

Step 4: Evaluate gaps

  • Review the elements the script couldn’t convert
  • Check text wrapping, crops and rotated elements side by side
  • Decide whether the gaps are small enough before you go further

Deliverable: A working proof of concept that opens one of your real designs in IMG.LY SDK. In our impact report, the median customer had a working prototype in two days.

Phase 2: Convert Templates, Then User Designs

Goal: Move your template library and your users’ saved designs into IMG.LY SDK scenes.

Step 1: Prepare assets

  • Host a font file for every family and weight your designs use
  • Move Base64 uploads to your storage and replace them with URLs
  • Make sure every image URL is absolute and reachable from your server

Step 2: Convert templates first

  • Run the conversion script from Phase 1 on every template. This loop does it for a folder of JSON files and writes a scene and a PNG preview next to each one:
for f in templates/*.json; do
  echo "$f"
  cp "$f" design.json && node convert.mjs || break
  mv design.scene "${f%.json}.scene"
  mv design.png "${f%.json}.png"
done
  • For a template with elements the script lists, or styles it drops, give its JSON to a coding agent connected to CoDesign, along with the Phase 1 script and its notes, since CoDesign doesn’t know Polotno’s conventions
  • Ask it to recreate the design rather than improve it, to keep each element’s Polotno name as the block name and to turn on the scopes your users need, since every block it creates starts with all of them off
  • In our test, the agent rebuilt a sample design as editable layers, with its stroke, line, locks and shadow, though the shadow came out slightly sharper. It saved an .imgly file, which bundles the images, so you store it as a file and open it with engine.scene.loadFromArchiveURL() rather than loadFromString()
  • Hand over the JSON, not a PDF export. Imported from Polotno’s PDF, the same design came in with its text split into lines and words, its shadow as a flat image and every block locked
  • Ask the agent for another pass on anything it misses, or fix it yourself in the editor’s Creator role
  • Re-check locks, since they decide what your users can change

Step 3: Validate outputs

  • Compare each template’s PNG preview from the loop, or a PNG export of each template CoDesign rebuilt, with its Polotno export
  • Document any differences in text wrapping

Step 4: Convert user designs

  • Convert in a batch, or convert each design the first time its owner opens it
  • Keep the original Polotno JSON next to the new scene
  • Store scenes as strings in the same place you store JSON today

Deliverable: Your core templates converted, checked and ready to use in the test environment.

Phase 3: Replace the Editor and Roll It Out

Goal: Everything your Polotno integration does today, running on IMG.LY SDK.

Step 1: Replace the editor

  • Swap the PolotnoContainer tree for IMG.LY SDK behind a feature flag
  • Wire up saving and loading with the scene string
  • Set the role for each kind of user

Opening a design for end users, Polotno today:

store.loadJSON(json);
store.setRole('user');

The same in IMG.LY SDK, which we ran in a React app:

import CreativeEditor from '@cesdk/cesdk-js/react';
import { initDesignEditor } from '../imgly';

export default function DesignEditor({ scene }: { scene: string }) {
  return (
    <CreativeEditor
      config={{ baseURL: '/assets' }}
      init={async (cesdk) => {
        await initDesignEditor(cesdk);
        // The string your conversion script saved
        await cesdk.engine.scene.loadFromString(scene);
        // Adopters can change only what each block's scopes allow
        cesdk.engine.editor.setRole('Adopter');
        // Fit the page to the viewport
        await cesdk.actions.run('zoom.toPage', { autoFit: true });
      }}
      width="100vw"
      height="100vh"
    />
  );
}

Key differences:

  • The role is what makes the converted locks count. In the Creator role every block is editable, and in the Adopter role the editor defers to each block’s scopes
  • With the sample design, an Adopter can retype the headline but can’t move, rotate, resize or restyle it, and can’t select the logo at all. We checked each of these scopes on the converted scene in the Adopter role
  • Loading a scene doesn’t fit it to the viewport, so the zoom.toPage action does that and keeps the page fitted when the window resizes
  • Polotno’s own docs note that the toolbar’s Lock button can remove the lock from any element the user is able to select. In IMG.LY SDK, the Adopter role respects the scopes a Creator set
  • Scopes only limit what people can do in the editor. Code on your server can change any block regardless, which is how the rendering script in Step 4 swaps a photo

Saving the scene string as people edit:

// Save the scene a second after the last change
let timeout = null;
cesdk.engine.editor.onHistoryUpdatedWithKind(() => {
  clearTimeout(timeout);
  timeout = setTimeout(async () => {
    const scene = await cesdk.engine.scene.saveToString();
    fetch('https://example.com/designs', { method: 'POST', body: scene });
  }, 1000);
});

Step 2: Rebuild custom UI

  • Recreate side panel sections as custom panels
  • Reorder or remove built-in controls with the Component Order API
  • Apply your theme and translations

Step 3: Migrate asset integrations

Step 4: Rebuild export and rendering

  • Replace export calls with engine.block.export(), as in the first snippet below
  • Move server rendering to @cesdk/node, as in the rendering script below
  • Check PDF sizes, color output and file sizes against your current pipeline

Exporting in the editor:

const page = cesdk.engine.scene.getCurrentPage();
const png = await cesdk.engine.block.export(page, {
  mimeType: 'image/png',
  // Converted scenes measure in pixels, so this doubles the size like pixelRatio: 2
  targetWidth: cesdk.engine.block.getWidth(page) * 2,
});
const pdf = await cesdk.engine.block.export(page, {
  mimeType: 'application/pdf',
});

Rendering a template for each data record, Polotno today:

import fs from 'fs/promises';
import { createInstance } from 'polotno-node';
import { resolveVariables } from '@polotno/schema/variables';

const instance = await createInstance({ key: 'YOUR_API_KEY' });

for (const record of records) {
  // Fills {{tokens}} and bound image sources from the record
  const { design } = resolveVariables(template, record);
  const base64 = await instance.jsonToImageBase64(design);
  await fs.writeFile(`./${record.first_name}.png`, base64, 'base64');
}
instance.close();

The same job in IMG.LY SDK, which we ran in Node.js:

import fs from 'fs/promises';
import CreativeEngine from '@cesdk/node';

// The same records you pass to Polotno's resolveVariables() today
const records = [
  {
    first_name: 'Anna',
    discount: '20%',
    user: { city: 'Berlin' },
    photo: 'https://img.ly/static/ubq_samples/sample_1.jpg',
  },
  {
    first_name: 'Marek',
    discount: '35%',
    user: { city: 'Warsaw' },
    photo: 'https://img.ly/static/ubq_samples/sample_2.jpg',
  },
];

// IMG.LY SDK variable names are flat, so { user: { city } } becomes "user.city"
const flatten = (record, prefix = '') =>
  Object.entries(record).flatMap(([key, value]) =>
    typeof value === 'object' && value !== null
      ? flatten(value, `${prefix}${key}.`)
      : [[`${prefix}${key}`, String(value)]]
  );

const engine = await CreativeEngine.init({
  license: process.env.CESDK_LICENSE ?? '',
});
const template = await fs.readFile('./design.scene', 'utf8');

try {
  for (const record of records) {
    await engine.scene.loadFromString(template);

    // Text: every {{token}} with a matching name is filled
    for (const [name, value] of flatten(record))
      engine.variable.setString(name, value);

    // Image: Polotno's bindings: { src: 'photo' } becomes a lookup by block name
    const [photo] = engine.block.findByName('photo');
    engine.block.setString(
      engine.block.getFill(photo),
      'fill/image/imageFileURI',
      record.photo
    );
    // Fill the frame with the new photo, centered, whatever its shape
    await engine.block.forceLoadResources([photo]);
    engine.block.setContentFillMode(photo, 'Cover');

    const [page] = engine.block.findByType('page');
    const png = await engine.block.export(page, { mimeType: 'image/png' });
    await fs.writeFile(
      `./${record.first_name}.png`,
      Buffer.from(await png.arrayBuffer())
    );
  }
} finally {
  engine.dispose();
}

Key differences:

  • The template is the scene your conversion script saved, loaded once per record
  • IMG.LY SDK variable names are flat, so a nested record is flattened first
  • The script swaps the photo by looking up its block name, which is why the conversion script names every block. If you bind the fill to an image variable in the template instead, set the photo with engine.variable.setImage() and leave it out of the setString() loop
  • After the swap, the script sets the fill mode to Cover, so the new photo fills the frame, centered, whatever its shape. A Polotno image without fit keeps the template’s crop for the new photo, so check templates where the framing matters
  • The render runs in the Node.js process, with no browser to launch
  • For larger batches, the CE.SDK Renderer runs the same scenes in a Docker container

Step 5: Roll out gradually

  • Enable the new editor for internal users, then a beta group, then everyone
  • Keep Polotno available as a fallback during the first weeks
  • Remove the Polotno integration once the new output holds up

Deliverable: A staging build on IMG.LY SDK that passes the same checks as your Polotno build.

What Teams Using Polotno Ask Before Switching

Teams moving from one editor SDK to another tend to raise the same questions. Here’s how to address them:

“Does our design library come across?”

Short answer: Mostly. A script converts text, images, basic shapes, groups, variables and locks. In our test on a sample design, a coding agent connected to CoDesign rebuilt the line, shadow and stroke the script skips. Tables, other shapes and inline formatting are left for you or the agent to rebuild, along with SVG, video, GIF and Lottie elements.

Practical approach:

  • Count your elements by type first, so you know how much the script won’t convert before you start
  • Convert templates before user designs, so problems surface in a few files before they surface in thousands
  • If a template started as a PSD, AI, IDML, PowerPoint, PDF, EPS or Figma file, try IMG.LY SDK’s importers on the original

”Will converted designs look the same?”

Short answer: Layout, colors, crops and line spacing should match once the conversion script in Phase 1 has converted them. Text can wrap differently.

Practical approach:

  • Compare each converted template with its Polotno export once
  • Pay attention to tight text boxes, where one extra line changes the layout
  • Adjust the conversion, such as a font file or a size, when the same difference shows up across designs

”Our backend edits design JSON directly. What now?”

Short answer: That code changes the most. A scene isn’t JSON, so direct edits become engine calls.

Practical approach:

  • Replace text patches with text variables
  • Replace image and color patches with variables bound to those properties, or with lookups by block name, as the rendering script in Phase 3 does for its photo
  • Run the engine in Node.js wherever that code lives today
  • If readable design data is a hard requirement, weigh that honestly against the reasons you’re moving

”How do we keep users working during the switch?”

Short answer: Run both editors side by side and move users in stages.

Practical approach:

  • Put the new editor behind a feature flag
  • Let internal users and a beta group go first
  • Convert a design when its owner next opens it, so nobody waits on a batch job
  • Keep the original JSON until the converted version has been checked

The Print Bar put IMG.LY SDK live roughly four weeks ahead of Christmas, its peak season, replacing an editor from 2012. Tom Rowe, from its product and engineering team, on how that went:

“Pretty much nothing went wrong for our launch. We demolished our expectations."

"What about the custom panels we built in React?”

Short answer: They’re rebuilt, not ported.

Practical approach:

  • Start with a starter kit configuration and change only what your users would miss
  • Rebuild panels with the builder API, which covers buttons, inputs, sliders and sections
  • For anything it can’t express, build your own UI on the engine API

Moving from IMG.LY’s older Photo Editor SDK, PostingBoost AI reworked its product around IMG.LY SDK, and that took real effort. Muhammad Salman Naseem, its lead developer, told us:

“You can access UI through APIs, the engine through APIs. It has relieved a lot of maintenance."

"What if IMG.LY SDK lacks a feature we rely on?”

Short answer: Check the short list first: tables, color and visibility bindings in the editor, and real-time collaboration.

Practical approach:

  • Tables can be rebuilt from text and shapes, or those designs can stay in Polotno for now
  • Image and color bindings become variable bindings, and visibility moves into your generation script, which finds blocks by name as the rendering script in Phase 3 does
  • Extend the editor with plugins for anything specific to your product
  • Ask our team about any requirement that still blocks you

Is Moving from Polotno Worth It?

The teams that gain the most hit two or more of the limits above, such as native iOS and Android editors, video on a timeline, server renders that match the editor, or exports for InDesign, Photoshop or Figma. A team that stays on the web can outgrow Polotno as well, when its users want a fuller editor, with finer template locks and AI that generates video, speech and sound as well as images and text. Weigh either case against rebuilding your custom panels, tables and bindings and rewriting any backend code built on the design JSON.

Where to Start

When you’re ready to start:

  1. Start building in evaluation mode today, no account needed, or hand the setup to your coding agent with the one-line prompt in Phase 1.
  2. Run the conversion script from Phase 1 on your most-used template.
  3. Review the IMG.LY SDK documentation for your stack, whether that’s a web framework, a native or cross-platform mobile app, a desktop app or a Node.js server.
  4. Contact our team about your migration plan.

If you’re still deciding:

Not sure your setup fits? Talk to our team. Tell us what your Polotno integration does today, and we’ll get back to you with a custom quote for your use case.

FAQ

Will my saved Polotno designs open in IMG.LY SDK?

For the most part, through a script rather than an importer. The conversion script in Phase 1 rebuilds text, images, rectangles, circles, groups, variables and locks from the saved JSON. It lists what it skips, such as tables, lines and other shapes, along with SVG, video, GIF and Lottie elements. In our test on a sample design, a coding agent connected to CoDesign rebuilt that design’s line, shadow and stroke from the JSON as editable layers. The script leaves out inline text formatting, which you or your coding agent can add back with range-based calls.

How long does a Polotno migration take?

It depends on two things. For the editor swap, the closest figures are in our impact report. Counted from first SDK access, the median there was two days until customers had a working prototype, and one 14-day sprint until they shipped a production-ready feature. Converting your design library comes on top, and its length depends on how many designs use tables, custom shapes or inline formatting.

Do my template variables still work?

Yes. A {{name}} token in Polotno text is a valid IMG.LY SDK text variable, and you set its value with engine.variable.setString(). Image sources and colors bind to image and color variables with engine.block.setVariableBinding(), and the conversion script lists each binding for you to set up again. Visibility has no variable type, so it becomes a line in your generation script.

Will a converted design look identical?

Mostly. Positions, colors, crops and line spacing carry over. Text is the exception. Polotno lays it out with the browser’s text engine and IMG.LY SDK uses its own, so a line can wrap in a different place. Compare each template once after converting it.

Can I read or edit an IMG.LY SDK scene as JSON?

Not as a documented format. A scene is an encoded string that you treat as opaque and change through the engine API. Saved without compression, it decodes to JSON, but unlike Polotno’s, that structure has no published schema. If you need a readable record of a design, keep your own metadata next to the scene, or read the values you care about with the API.

Do we need React to use IMG.LY SDK?

No. The web editor mounts from React, from any other web framework or from plain JavaScript. Your React side panels and toolbar buttons get rebuilt in any case, the panels with a builder API and the toolbar items by inserting or reordering them by ID.

Will our server rendering pipeline change?

Yes, if you render with polotno-node, Polotno’s export packages or its Cloud Render API. IMG.LY SDK renders on your own servers with @cesdk/node, which runs the editor’s engine without a browser, and the CE.SDK Renderer handles high-volume jobs in a Docker container. Step 4 of Phase 3 renders one template per data record with both products.

Is IMG.LY SDK more expensive than Polotno?

Both are quote-based. Polotno charges a license fee quoted for your scope and volume, and bills its hosted Cloud Render service separately. IMG.LY SDK is sold as a subscription, billed monthly or yearly, and each platform you ship on needs its own license. See our pricing page or ask our team for a quote that matches your setup.

Can I try IMG.LY SDK before committing to the move?

Yes. Leave the license key out and you get the full API, with a watermark on each export. You can run the conversion script in this guide without signing up for anything.

What support can we get from IMG.LY while we migrate?

Your license type sets how much support IMG.LY’s solutions team gives you, on top of the IMG.LY SDK documentation. If you’re unsure which level fits your migration, ask the team.