Skip to content

DiscordImageAttachment

  • LitElement

new DiscordImageAttachment(): DiscordImageAttachment

DiscordImageAttachment

LitElement.constructor

The alt text to show in case the image was unable to load

'discord attachment'

Indicates that you intend to use a custom image element, useful if you want to use something like `next/image`

Once this property is set, use the child element (default slot) to insert the code for the desired image component

Setting this will disable the `url`, and `alt` properties.


The height of the image in pixels


The URL for the image attachment

Should be a valid image URL, i.e. matching the regex /\.(bmp|jpe?g|png|gif|webp|tiff)$/i


The width of the image in pixels

componentWillRender(): void

void