Image Block
The Image Block is a block that allows you to display images in your email. It supports several options to help you customize the appearance of your image.
Options
The Image Block supports the following options:
border
: The border around the image. It supports theIBorder
interface.width
: The width of the image. It supports theIWidthHeight
interface.height
: The height of the image. It supports theIWidthHeight
interface.link
: The link that the image should link to. It supports theILink
interface.align
: The alignment of the image. This can beleft
,center
, orright
.title
: The title of the image. This is used for accessibility purposes.padding
: The padding around the image. It supports theIPadding
interface.
Usage
To use the Image Block in your email, you can create a new instance of the ImageBlock
class and customize its options.
Here’s an example:
In this example, we’ve customized the border, width, height, link, alignment, title, and padding of the Image Block.
{% hint style=“info” %}
Note: The src
and alt
options are required, and the width
and height
options should be specified to ensure
that the image is displayed correctly.
{% endhint %}