# How do I send images with my emails?

{% hint style="info" %}
Adding images to Mechanic-generated emails is a job that always involves code. If this is your first time eyeing custom Mechanic code, start here: [I need something custom!](/custom.md).
{% endhint %}

## Attaching images

The [Email action](/core/actions/email.md) supports attaching anything that you can express using JSON. (The rest of this article will assume you're familiar with this action.)

If you happen to have your base64-encoded image data on hand, you can attach it with a line like this:

```json
"attachments": {
  "image.jpg": {
    "base64": {{ image_jpg_base64 | json }}
  }
}
```

## Embedding images

You may add image tags in your emails (useful for adding logos!), but please note that Mechanic does not support embedding attached images.

Instead, upload your image to Shopify ([learn how](https://help.shopify.com/en/manual/shopify-admin/productivity-tools/file-uploads#upload-a-file-on-the-files-page)), and use the URL provided by Shopify to add your image using HTML:

```html
{% capture email_body %}
  <p>Welcome!</p>
  <img src="https://cdn.shopify.com/s/files/1/0000/0000/0000/files/welcome_email.jpg">
{% endcapture %}
```

```liquid
"body": {{ email_body | unindent | json }}
```


---

# Agent Instructions: 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:

```
GET https://learn.mechanic.dev/faq/how-do-i-send-images-with-my-emails.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
