Skip to content

Image

Represents an image asset. It can be used via an Image component.

Reference

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 Smelter is deployed.

  • Type: string

resolution

The resolution to use when rendering an SVG image.

  • Type: string