Troubleshoot: Images Not Loading in Generated Document

Introduction

If images show up in the template editor but do not load in the generated document, there are three common causes and resolutions.

Image URL Redirects to Another Page

If your image URL redirects to another page, Salesforce may prevent it from loading.

To resolve this, navigate to the Setup menu. Type "Custom Settings" into the Quick Find bar, then click Custom Settings in the dropdown menu. Then, locate the SDocsSettings record and click Manage.

If no record exists, click New. Otherwise, click Edit.

Check the Stabilized URLs Checked field, then click Save.

Images should begin loading correctly.

Image URL is From External Source

If your image URL is from outside of Salesforce, you need to Allowlist the URL's domain through Remote Site Settings.

Navigate to the Setup menu. Type "Remote Site Settings" into the Quickfind bar, then click Remote Site Settings in the dropdown menu. Then, click New Remote Site.

Enter the following details for your remote site:

Remote Site Name: externalImageSDocs
Remote Site URL: Image URL Domain

For example, if your full image URL is "https://www.google.com/image", enter "https://www.google.com" as the Remote Site URL.

Click Save. Your external image should now load correctly.

Image URL is From Documents Object

If your image was uploaded to the Salesforce Documents folder manually, it must be set to Externally Available to be used in S-Docs.

To set your image as Externally Available, navigate to the Documents object in Salesforce Classic (Click the + (All Tabs) symbol to find the Documents object).

Find the Document record for your image and click its name.

Check the Externally Available Image checkbox.

The image should now load correctly.

Was this helpful?