Back to Glossary
Asset Management

URI Resolver

Also known as: Custom URI Resolver

Definition

The mechanism in CE.SDK that controls how asset URIs are translated into absolute paths before the engine fetches them. When CE.SDK loads any asset (an image, font, video, or scene file) it first resolves the URI to determine the actual URL to fetch. The URI Resolver is the interception point that allows this resolution logic to be customized.

By default, CE.SDK resolves URIs relative to the configured basePath setting. Absolute URIs (those beginning with http://, https://, or data:) pass through unchanged. Relative paths are prepended with the basePath value. A custom resolver overrides this behavior entirely: every URI requested by the engine is passed through the resolver function, and whatever URL the function returns is what the engine fetches. The resolved URI is used only for the current request and is not stored.

What the URI Resolver Enables

Authentication

A common use case is appending authentication tokens to asset URIs before the engine makes the request. A token is generated and attached as a query parameter. The server receiving the request can then validate the token and redirect to the actual asset (for example, a pre-signed S3 URL). CE.SDK follows redirects automatically.

Asset transformation

The resolver can rewrite any URI based on file type, path pattern, or any other logic. For example, all JPEG requests could be redirected to watermarked versions during an editing session, then switched to full-resolution versions at export time.

CDN and multi-origin routing

In integrations where assets are hosted across multiple servers or CDNs, the resolver centralizes the routing logic, mapping URIs to the correct origin without requiring asset paths in the scene to be absolute.

Low-res / high-res switching

A pattern supported in CE.SDK is loading low-resolution images during editing for performance, then swapping to full-quality assets just before export. The URI resolver can handle this switch at the path level, directing the same scene to different asset qualities depending on the context.

Watermarked preview media

Platforms that require payment or licensing before granting access to full assets can serve watermarked or preview versions during editing via the resolver, then replace them with purchased assets post-checkout using a one-time URI update.

Custom Resolver Behavior

When a custom resolver is set, relative paths that the resolver does not explicitly transform remain unmodified; they are not automatically prepended with basePath. The custom resolver must return an absolute path with a scheme.

The resolver can call the default resolution logic as a fallback for any URIs it does not need to transform. This is the recommended approach when the resolver should only intercept a subset of URIs, for example, only those matching a specific scheme or path prefix.

Removing a custom resolver restores the default basePath behavior.