Image
The image building block lets you add images to your template. You can upload a static image or load one dynamically from your data.
Adding an image
Drag the Image icon from the toolbar and drop it onto the canvas.
Properties
When you select an image element, the properties panel opens on the side with the following options:
- Margins — Set the left (L), top (T), right (R), and bottom (B) margins around the image element.
- Alignment — Align the image to the left, center, or right.
- Image source — Choose how to provide the image (see below).
- Size type — Controls how the image is sized:
- Normal — The image is displayed at its original size. An Auto size toggle is available; when enabled, the image automatically fits within the available space. When disabled, you can set the width (W) and height (H) manually. A link icon lets you lock the aspect ratio.
- Fit — The image is resized to fit within the specified width (W) and height (H) without exceeding either dimension, while preserving the original aspect ratio.
- Visible when — An expression that controls whether this element appears in the generated PDF. See Conditional visibility.
- Delete — Removes the element from the template.
Image source
Large images slow down PDF generation. Use the lightest images possible — resize and compress them before uploading or referencing them via dynamic data.
JPEG vs PNG — JPEG decodes 2–5× faster than PNG for photographic images and produces smaller files, so prefer it when you don't need transparency or pixel-perfect fidelity. Use PNG when you need an alpha channel (transparency) or lossless quality — for example screenshots, text-heavy graphics, or diagrams with flat colors.
The image source section has two tabs:
Upload
Upload an image file directly from your computer. Allowed formats are PNG and JPG, with a maximum file size of 1 MB. This is best for static images that don't change between PDFs — such as a company logo or a decorative graphic.
From data
Load the image from your dynamic data. This tab has two fields:
- Content type — Select whether the dynamic data will provide the image as a
Urlor as aBase64-encoded string. - Data field — The name of the field in your dynamic data that contains the image.
For example, if your dynamic data looks like this:
{
"companyLogo": "https://example.com/logo.png"
}
You would set the content type to Url and the data field to companyLogo.
When using Url as the content type, the image must be publicly accessible. If generating the PDF in the browser, the image must also not be blocked by CORS.
Dynamic data
Unlike other building blocks where you type placeholders inline, images use the From data tab in the properties panel to reference dynamic data. See the section above for details.
To learn more about dynamic data, see the Dynamic data page.