Search Docs
Loading...
Skip to content

Serve Assets

Configure CE.SDK to load engine and content assets from your own servers instead of the IMG.LY CDN for production deployments.

Self-hosting assets is required for production use. The IMG.LY CDN is intended for development and prototyping only—you’ll see a console warning when using the default CDN configuration. Hosting assets yourself gives you control over performance, availability, and compliance requirements.

Use the switch below to choose your setup: the full Editor (@cesdk/cesdk-js), which registers asset sources through editor plugins, or a Headless custom UI (@cesdk/engine), which registers them directly with the engine API.

The full editor registers asset sources through plugins imported from @cesdk/cesdk-js/plugins, each of which accepts a baseURL option.

Download Assets (v1.77.1)

Quick Start#

Download and extract the essential assets for your SDK version:

Terminal window
# Download assets for current SDK version
curl -O https://cdn.img.ly/packages/imgly/cesdk-js/1.77.1/imgly-assets.zip
# Create versioned directory and extract assets
mkdir -p public/cesdk/1.77.1
unzip imgly-assets.zip -d public/cesdk/1.77.1/
rm imgly-assets.zip

Then configure CE.SDK to use your self-hosted assets:

import CreativeEditorSDK from '@cesdk/cesdk-js';
import {
BlurAssetSource,
ImageColorsAssetSource,
ColorPaletteAssetSource,
CropPresetsAssetSource,
DemoAssetSources,
EffectsAssetSource,
FiltersAssetSource,
PagePresetsAssetSource,
StickerAssetSource,
TextAssetSource,
TextComponentAssetSource,
TypefaceAssetSource,
UploadAssetSources,
VectorShapeAssetSource
} from '@cesdk/cesdk-js/plugins';
const config = {
license: 'YOUR_CESDK_LICENSE_KEY',
baseURL: `https://cdn.yourdomain.com/cesdk/${CreativeEditorSDK.version}/`
};
CreativeEditorSDK.create(container, config).then(async (cesdk) => {
const assetBaseURL = `https://cdn.yourdomain.com/cesdk/${CreativeEditorSDK.version}/`;
// Add default asset source plugins
await cesdk.addPlugin(new BlurAssetSource({ baseURL: assetBaseURL }));
await cesdk.addPlugin(new ColorPaletteAssetSource({ baseURL: assetBaseURL }));
await cesdk.addPlugin(new CropPresetsAssetSource({ baseURL: assetBaseURL }));
await cesdk.addPlugin(new EffectsAssetSource({ baseURL: assetBaseURL }));
await cesdk.addPlugin(new FiltersAssetSource({ baseURL: assetBaseURL }));
await cesdk.addPlugin(new PagePresetsAssetSource({ baseURL: assetBaseURL }));
await cesdk.addPlugin(new StickerAssetSource({ baseURL: assetBaseURL }));
await cesdk.addPlugin(new TextAssetSource({ baseURL: assetBaseURL }));
await cesdk.addPlugin(
new TextComponentAssetSource({ baseURL: assetBaseURL })
);
await cesdk.addPlugin(new TypefaceAssetSource({ baseURL: assetBaseURL }));
await cesdk.addPlugin(new VectorShapeAssetSource({ baseURL: assetBaseURL }));
// Add demo and upload sources
await cesdk.addPlugin(
new UploadAssetSources({ include: ['ly.img.image.upload'] })
);
await cesdk.addPlugin(
new DemoAssetSources({
include: [
'ly.img.templates.blank.*',
'ly.img.templates.presentation.*',
'ly.img.templates.print.*',
'ly.img.templates.social.*',
'ly.img.image.*'
]
})
);
});

Configuration Options#

Browser configuration involves three settings: baseURL, core.baseURL, and the baseURL option for asset sources.

Editor Configuration#

Pass configuration to CreativeEditorSDK.create():

import CreativeEditorSDK from '@cesdk/cesdk-js';
const config = {
baseURL: `https://cdn.yourdomain.com/cesdk/${CreativeEditorSDK.version}/`,
core: {
baseURL: 'core/'
}
};
CreativeEditorSDK.create(container, config).then((cesdk) => {
// Editor initialized with self-hosted assets
});

baseURL — Base path for all engine assets. Can be an absolute URL or a relative path. Relative paths resolve against window.location.href. Defaults to the IMG.LY CDN.

core.baseURL — Path to WASM files. Defaults to core/ relative to baseURL. Usually you don’t need to change this unless hosting WASM files separately.

Asset Sources Configuration#

Each asset-source plugin accepts a baseURL option pointing at your self-hosted assets:

await cesdk.addPlugin(new StickerAssetSource({ baseURL: assetBaseURL }));
await cesdk.addPlugin(new TypefaceAssetSource({ baseURL: assetBaseURL }));

The baseURL must be an absolute URL. The engine looks up each source’s definition at {baseURL}/{sourceId}/content.json and references files like {baseURL}/{sourceId}/images/example.png. Register the full set the same way—the Quick Start above shows the complete list.

Default Asset Sources#

Adding the default asset source plugins registers these asset sources:

  • ly.img.sticker - Stickers
  • ly.img.sticker.misc - Additional stickers
  • ly.img.vector.shape - Shapes and arrows
  • ly.img.typeface - Font definitions
  • ly.img.color.palette - Color palettes
  • ly.img.filter - Filter effects
  • ly.img.effect - Visual effects
  • ly.img.blur - Blur presets
  • ly.img.crop.presets - Crop aspect ratios
  • ly.img.page.presets - Page format presets
  • ly.img.page.presets.video - Video page presets
  • ly.img.caption.presets - Caption formatting
  • ly.img.text - Text style presets (Plain Text)
  • ly.img.text.styles - Text style presets (Text Styles)
  • ly.img.text.curves - Text style presets (Curved Text)
  • ly.img.text.components - Text combinations
  • ly.img.animation - Animation presets
  • ly.img.animation.text - Text animation presets

Demo Asset Sources#

Adding the DemoAssetSources and UploadAssetSources plugins registers sample content sources for development:

  • ly.img.image - Sample images
  • ly.img.video - Sample videos
  • ly.img.audio - Sample audio
  • ly.img.template - Design templates
  • ly.img.video.template - Video templates
  • ly.img.image.upload, ly.img.video.upload, ly.img.audio.upload - Upload sources

These are intended for development and prototyping—replace them with your own content in production.

Excluding Unused Asset Sources#

If you only need a subset of default assets, simply omit the plugins you don’t need. For example, to skip stickers and video page presets, add all plugins except StickerAssetSource and the video page presets:

// Only add the plugins you need
await cesdk.addPlugin(new BlurAssetSource());
await cesdk.addPlugin(new ImageColorsAssetSource());
await cesdk.addPlugin(new ColorPaletteAssetSource());
await cesdk.addPlugin(new CropPresetsAssetSource());
await cesdk.addPlugin(new EffectsAssetSource());
await cesdk.addPlugin(new FiltersAssetSource());
await cesdk.addPlugin(new PagePresetsAssetSource());
// StickerAssetSource omitted
await cesdk.addPlugin(new TextAssetSource());
await cesdk.addPlugin(new TextComponentAssetSource());
await cesdk.addPlugin(new TypefaceAssetSource());
await cesdk.addPlugin(new VectorShapeAssetSource());

This reduces initial load time by not fetching unused asset definitions.

Understanding CE.SDK Assets#

CE.SDK assets are distributed in an imgly-assets.zip file available for download from the IMG.LY CDN. Understanding what’s in this archive helps you decide which assets to host and how to keep them updated. Both packages use the same archive layout; only the download location differs (cesdk-js for the editor, cesdk-engine for the headless engine).

Asset Categories#

The ZIP file contains directories organized by function:

DirectoryContentsVersion-Locked?Required?
core/WASM engine files (.wasm, .data, worker-host.js)YesYes
ui/UI resources (audio waveform, fonts, stylesheets)YesYes
emoji/Emoji assetsYesYes
fonts/System fontsYesYes
i18n/TranslationsYesNo (bundled in SDK)
ly.img.sticker/StickersNoIf using default assets
ly.img.sticker.misc/Additional stickersNoIf using default assets
ly.img.vector.shape/Shapes and arrowsNoIf using default assets
ly.img.typeface/Font definitionsNoIf using default assets
ly.img.filter/Filter effects (LUT and duotone)NoIf using default assets
ly.img.effect/Visual effectsNoIf using default assets
ly.img.blur/Blur presetsNoIf using default assets
ly.img.color.palette/Color palettesNoIf using default assets
ly.img.crop.presets/Crop aspect ratiosNoIf using default assets
ly.img.page.presets/Page format presetsNoIf using default assets
ly.img.page.presets.video/Video page presetsNoIf using default assets
ly.img.caption.presets/Caption formatting presetsNoIf using default assets
ly.img.text/Text style presets (Plain Text)NoIf using default assets
ly.img.text.styles/Text style presets (Text Styles)NoIf using default assets
ly.img.text.curves/Text style presets (Curved Text)NoIf using default assets
ly.img.text.components/Text combinationsNoIf using default assets
ly.img.animation/Animation presetsNoIf using default assets
ly.img.animation.text/Text animation presetsNoIf using default assets
ly.img.image/Sample images (demo content)NoNo
ly.img.video/Sample videos (demo content)NoNo
ly.img.audio/Sample audio (demo content)NoNo
ly.img.template/Design templates (demo content)NoNo
ly.img.video.template/Video templates (demo content)NoNo

For most integrations, you need core/, ui/, emoji/, fonts/, and the ly.img.* asset sources you use.

Version-Locked vs. Independent Assets#

Version-locked assets (core/, ui/, i18n/) must match your SDK version. Mismatched versions cause load errors—the engine will fail to initialize if core files don’t match.

Independent assets (ly.img.* directories) can be updated separately. Register each one as an asset source that points at its content.json under your baseURL. Check the changelog when upgrading to see if asset versions have changed.

Engine-Level Assets#

The engine uses additional assets for font fallback (Unicode character coverage) and emoji rendering. When you configure baseURL for self-hosting, the engine automatically uses the same location for these assets:

  • Font fallback files — Used when text contains characters not covered by the selected font. Located at {baseURL}/fonts/font-{index}.ttf.
  • Emoji font — The default emoji font (NotoColorEmoji.ttf). Located at {baseURL}/emoji/NotoColorEmoji.ttf.

The fonts/ and emoji/ directories are already included in the imgly-assets.zip download, so no additional configuration is needed when self-hosting—just ensure these directories are present at your baseURL location.

Troubleshooting#

WASM Load Errors#

If the engine fails to initialize with missing .wasm or .data errors, verify:

  1. The assets ZIP version matches your SDK version
  2. The core.baseURL points to the correct directory
  3. Your server returns correct MIME types for .wasm files (application/wasm)

404 Errors for Assets#

If the console shows 404 errors for content.json files:

  1. Verify the baseURL your asset sources resolve against is correct
  2. Check that asset directories exist at the expected paths
  3. Configure CORS headers if serving assets from a different domain

CDN Warning in Console#

The warning “You’re using the IMG.LY CDN” appears when using default configuration. Set baseURL in your config to use self-hosted assets and remove the warning.

API Reference#

Editor (@cesdk/cesdk-js)#

Method/ConfigPurpose
CreativeEditorSDK.create(container, config)Initialize editor with configuration
config.baseURLBase path for all engine assets (including fonts and emoji)
config.core.baseURLPath to WASM/core files (relative to baseURL)
cesdk.addPlugin(new XyzAssetSource())Add individual asset source plugins
CreativeEditorSDK.versionGet current SDK version string

Custom UI (@cesdk/engine)#

Method/ConfigPurpose
CreativeEngine.init(config)Initialize the headless engine with configuration
config.baseURLBase path for engine and content assets
engine.getBaseURL()Return the configured base URL
engine.asset.addLocalAssetSourceFromJSONURI(contentURI, options?)Register a content asset source from its content.json
engine.asset.addLocalSource(id, supportedMimeTypes?)Register a local source for uploads
CreativeEngine.versionGet current SDK version string