The Image parameter with H and W options resizes an image when the document is generated. You set the height, the width or both in pixels, so embedded images look consistent.
Syntax
{{Image:Object.Field:H=HeightInPixels:W=WidthInPixels}}
Values
| Component | Effect |
|---|---|
Object.Field | A Salesforce field that contains an image URL. |
H | Height in pixels, for example H=100 for 100 px. |
W | Width in pixels, for example W=200 for 200 px. |
H and W also work with a static resource image, for example {{Image:StaticResource.Staticcontent:H=50:W=100}}, including in a Word header.
You can use H, W or both. If you set only one, Docs Made Easy resizes the image proportionally to keep its original aspect ratio. If you set both, the image takes exactly that size, which can stretch it.
Where to add it
Type the Image merge field in your Word template where you want the image to appear.
Example
| Field value | Syntax | Output |
|---|---|---|
Account.Description holds an image URL | {{Image:Account.Description:H=50:W=100}} | The image, 50 px high and 100 px wide |
| The same value | {{Image:Account.Description:W=200}} | The image, 200 px wide, height in proportion |

Works in
The example on this page uses a Word template. Image tags work in Word, PowerPoint and Excel templates, including headers, footers and table rows. Setting the height and width failed before version 1.19.0.
Common errors
- The image is stretched or distorted. Both
HandWare set to a different shape from the image. Set only one of them to keep the proportions. - The size options are ignored. Setting the height and width failed before version 1.19.0. Upgrade if you're on an older version.
- "Document is too large to process." Compress the image before you store its URL. See DME-DOC-001.
For more fixes, see Images are missing or broken in the generated document.