Image
Represents an image asset uploaded to the smelter. Used by an Image component.
import { Renderers } from "@swmansion/smelter"
Renderers.RegisterImage
Type definitions
type RegisterImage = { | { assetType: "png"; url?: string; serverPath?: string; } | { assetType: "jpeg"; url?: string; serverPath?: string; } | { assetType: "gif"; url?: string; serverPath?: string; } | { assetType: "svg"; url?: string; serverPath?: string; resolution?: { width: u32, height: u32, }; }
Properties
assetType
Image format.
- Type:
"jpeg" | "png" | "gif" | "svg"
url
URL for downloading an image. This field cannot be used together with the path field.
- Type:
string
serverPath
Path to an image, specifying its location on the server where the Smelter is deployed.
- Type:
string
resolution
The resolution to use when rendering an SVG image.
- Type:
string