rednode API - v0.80.1
    Preparing search index...

    Interface ImageProps

    Properties of ui.image.

    interface ImageProps {
        alt?: string;
        src: string;
        version?: number;
        width?: number;
    }
    Index
    alt?: string

    Words for the picture, shown while it loads or when it cannot be shown.

    src: string

    The picture: a PNG, JPEG, WebP or GIF file, or a data:image/...;base64, URL. A relative path is in the package's folder; a full path must be in the package's folder or its data folder (pkg.dataDir), where a mod writes the pictures it makes. Setting the same path again shows the file as it is now, so a mod can write a new picture over the old one.

    version?: number

    Changes the picture's address without changing src, to show a file again by hand. Rarely needed: setting src does it.

    width?: number

    Width in pixels; the height follows the picture's shape. Scaled down to fit the window when wider. Without it, the picture's own width.