<img>

About The Img Tag

<widget>
  <img src="https://github.com/Normal-Tangerine8609/Scriptable-HTML-Widget/blob/main/images/logo.jpeg"/>
</widget>

The <img> element defines a widget image element. It is a self-closing tag, meaning you do not need a second closing tag but it must be marked with a forwardslash at the end.

Attributes

src - image

Defines the image. All <img> elements must have a src attribute. This attribute cannot be set with css.

borderColor - colour

Defines the border color.

borderWidth - posInt

Defines the border width.

cornerRadius - posInt

Defines the corner radius.

imageOpacity - decimal

Defines the opacity of the image.

imageSize - size

Defines the size of the image.

tintColor - colour

Defines the tint color.

url - url

Defines the image URL.

contentMode - contentMode

Defines the content mode of the image (filling or fitting).

alignImage - alignImage

Defines the horizontal alignment of the image.

resizable - bool

On true, it does not allow the image to be resizable.

Last updated