> 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

## 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="/files/hoqblMjIUghrbzWdn4gP" 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="/files/UDRE7POKfsG7xbJjBrCR" 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="/files/XSvPsMyeP0Wc8BlFJu0w" 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="/files/E4N8PdsaW7E9alPf2i9O" 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
