> For the complete documentation index, see [llms.txt](https://help.sdocs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.sdocs.com/sdocs/template-architecture/images-in-s-docs/static-image-solutions/images-as-static-resources.md).

# How to: Add Images as Static Resources

This is a guide to show how to add images as a static resource within Salesforce to then leverage within S-Docs Templates.

## Instructions

### Phase 1: adding images to Salesforce as a static resource.

{% stepper %}
{% step %}

#### Add a new static resource in Salesforce

Click the gear (1) and then Setup, then search for Static Resources (2), then click Static Resources (3) and create a new one (4).
{% endstep %}

{% step %}

#### Choose the file and save the resource

Choose the name, select your image file, set to public, and click Save.

<figure><img src="https://1548664070-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWKNnJmhJBQwhdk5WBFsi%2Fuploads%2Fgit-blob-7ebf3b3e245b5c57e832df11a6d020d838091e6e%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

### Phase 2: adding the image to a S-Docs template.

{% stepper %}
{% step %}

#### View the static resource

Now your image will populate in Static Resources and you can click on it. Now click View.

<figure><img src="https://1548664070-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWKNnJmhJBQwhdk5WBFsi%2Fuploads%2Fgit-blob-f003272f15a3b3f0997e3f2bcf0dd140322a79e5%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Use the URL or resource tag

You can now use this URL or the resource tag in your template, and configure it however you would like.

<figure><img src="https://1548664070-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWKNnJmhJBQwhdk5WBFsi%2Fuploads%2Fgit-blob-04adce335da25a59b117bcf44b6474866d08f19e%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Note:** If you're sending documents externally (like email templates) and you selected an image using Browse Server, you need to ensure the Salesforce document record is set to externally available
{% endhint %}
{% endstep %}

{% step %}

#### Add the image to your template with

Navigate to your template and add it to your template with the tag, and configure it however you would like.

<figure><img src="https://1548664070-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWKNnJmhJBQwhdk5WBFsi%2Fuploads%2Fgit-blob-25f45ba18fc88708cebc4111e004ab59c49e1fe3%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

{% hint style="info" %}
You can only make hyperlinks for images if the images are saved in Salesforce as a static resource
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.sdocs.com/sdocs/template-architecture/images-in-s-docs/static-image-solutions/images-as-static-resources.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
