---
title: PICTURE DataSource
description: "This article explains how to include images stored in Salesforce, such as company logos, in your PDF Butler documents. Images can be retrieved from **Salesforce Files**, **Attachments**, or **Documents** and inserted dynamically during document generation. Read this article to understand…"
url: "https://pdfbutler.com/academy/pdf-butler-academy/pdf-butler-by-datasource/picture-datasource/"
updated: "2026-08-25"
category: PDF BUTLER BY DATASOURCE
---

# PICTURE DataSource

This article explains how to include images stored in Salesforce, such as company logos, in your PDF Butler documents. Images can be retrieved from **Salesforce Files**, **Attachments**, or **Documents** and inserted dynamically during document generation.

Read this article to understand the configuration process. You can also watch the accompanying video tutorial for a visual walkthrough of each step.

[DataSource Demo - PICTURE](https://www.youtube.com/embed/Airk3mGMb0s?si=D_saB7OB2AfpgJ-Z)

> **Best Practice:**
> Avoid using very large images. Oversized images increase Salesforce storage usage and generate unnecessarily large documents, which can negatively impact the user experience.

---

In this example, an **Account** record contains a company logo stored as a Salesforce File. The objective is to display this logo automatically in the generated document.

The configuration consists of two main steps:

1. Create a **Picture Data Source** that retrieves the image from Salesforce.
2. Configure a **Picture Config Type** to replace a placeholder in the Word document with the retrieved image.

#### Setting Up the DataSource

1. Open your existing **Data Source.****![](https://pdfbutler.com/wp-content/uploads/2023/08/Screenshot-2026-08-25-at-11.40.35-300x139.png)**

Since the image in this example belongs to the Account, we will create a **child data source**.

1. In the **Related List**, click **New**.
    ![](https://pdfbutler.com/wp-content/uploads/2023/08/Screenshot-2026-08-25-at-11.41.06-300x118.png)
2. Select **Picture List** as the data source type.
    ![](https://pdfbutler.com/wp-content/uploads/2023/08/Screenshot-2026-08-25-at-11.41.51-300x163.png)
3. Enter a name for the data source (for example, **Account Logo**).
4. Select the **Image source**. (in this case "Files")
5. Inform the name of the Image.
6. Inform the **Parent Query Field Name.**
7. Save the data source.
    ![](https://pdfbutler.com/wp-content/uploads/2023/08/Screenshot-2026-08-25-at-11.43.21-300x215.png)

#### Add the Picture Data Source to the Document

1. Open your document configuration.
2. From the existing **Single Data Source**, add the newly created **Picture Data Source** as a child.![](https://pdfbutler.com/wp-content/uploads/2023/08/Screenshot-2026-08-25-at-11.58.35-300x146.png)![](https://pdfbutler.com/wp-content/uploads/2023/08/Screenshot-2026-08-25-at-11.58.57-300x101.png)![](https://pdfbutler.com/wp-content/uploads/2023/08/Screenshot-2026-08-25-at-11.59.41-300x119.png)

#### Insert a Picture Placeholder

In your Word document, make sure that there is a placeholder where the image should appear.

For example: `[[!Account_Logo!]]`

Save the Word document and upload the updated version to the server.
 ![](https://pdfbutler.com/wp-content/uploads/2023/08/Screenshot-2026-08-25-at-12.01.21-300x195.png)

#### Configure the Picture Config Type

Create a new **Config Type** with the following settings:

| Setting | Value |
| --- | --- |
| Type | Picture |
| Data Source | Account Logo |
| Merge Field | Account_Logo |

Since there is only one Picture Data Source associated with this section, PDF Butler automatically selects it.

Configure the picture formatting according to your layout requirements.

Save the configuration.
 ![](https://pdfbutler.com/wp-content/uploads/2023/08/Screenshot-2026-08-25-at-12.13.17-300x259.png)

#### Generate the Document

Generate the document from the Salesforce record.

During generation, PDF Butler:

1. Retrieves the Account record.
2. Finds the file named **Logo** attached to that Account.
3. Downloads the image.
4. Replaces the placeholder with the image.

The generated document now contains the Account logo in the configured location.![](https://pdfbutler.com/wp-content/uploads/2023/08/Screenshot-2026-08-25-at-12.21.19-300x190.png)
