Dynamic Images

DocsAutomator allows for images to be added anywhere in documents

Many document workflows require images to be added and they certainly make your documents shine. DocsAutomator gives you the option to add images anywhere in documents incl. in line items. Images are automatically pre-processed, converted and can be resized.

Passed images need to be publicly available on the web

Syntax / General

As outlined in Google Doc Template Guide, images need to be declared with a special syntax {{image_...}} (Examples: {{image_headshot}}, {{image_product}}, {{image_someUniqueText}}). This syntax tells DocsAutomator that you're intending to add images at this place in the document. You can either pass a single image or multiple images at once. Images are added inline in the document.

Pre-processing / Converting

Images are pre-processed to ensure they are optimized before being added to documents, which is especially important for reducing file size. Additionally, images are automatically converted to .jpg format. Supported formats include JPG, PNG, GIF, BMP, TIFF, ICO, PDF, EPS, PSD, SVG, WebP, JXR, and WDP. However, PNG files are not converted to .jpg to preserve their transparency.

In your automation settings under "Template / Document Generation Options", you will find "Image Options".

Here you'll be able to set quality and maximum width of passed images. The set quality parameter determines how much images are reduces in quality before being added. Options are Low, Eco, Good and Best. The usual recommendation is "Eco" which is a good balance between quality and file size.

The maximum width parameter often has a bigger impact on the size of images. Example with 600px max. width (standard setting): If an exemplary image with 8000 x 6000px (48 megapixels) is passed, it would get resized to 600 x 450px. This significantly reduces file size and is often not even visible in printed documents. If quality is important in your use case, choose a higher maximum width. Options range from 200 to 2000px.

Resizing images

For every image placeholder, you can resize images via the placeholder options in DocsAutomator's interface:

If the resizing parameter exceed the maximum width in your automation settings, the image will be expanded and looses quality. Ideally keep the max. width under "Template / Document Generation Options" higher than the resizing parameter on your image placeholder.

The aspect ration will always be preserved. Rules: If one dimension is specified then the other dimension is calculated to preserve the aspect ratio of the image. If both width and height are specified, the image is scaled to fit within the provided dimensions while maintaining its aspect ratio.

Passing images via the DocsAutomator API

When using the API, please pass an array of image URLs.

Last updated