Image Fields
Image fields allow you to embed dynamic images into your generated documents. Common uses include company logos, adviser photos, signature images, and chart outputs.
Syntax
Image fields use a dedicated directive that specifies the image source and optional dimensions.
Template syntax
{{#image src="company_logo" width="200" height="60"}}{{/image}}
{{#image src="adviser_signature"}}{{/image}}Options
- src — the field name containing the image URL or base64 data.
- width — optional width in pixels. If omitted, uses the image's natural width.
- height — optional height in pixels. If omitted, maintains aspect ratio.
- alt — optional alt text for accessibility.
Supported formats
AdviceDocs supports PNG, JPEG, and SVG images. Images can be provided as a URL or as base64-encoded data in the image field value.
Example data
Data
{
"company_logo": "https://example.com/logos/acme-financial.png",
"adviser_signature": "data:image/png;base64,iVBORw0KGgo..."
}Image size
Large images increase your document file size. We recommend keeping images under 500KB each. For logos and signatures, PNG with a transparent background at 2x resolution works best.