> ## Documentation Index
> Fetch the complete documentation index at: https://developer.dashsocial.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Dynamic email template

> Dynamically pull latest media from Dash Social Boards and LikeShop into email templates.

## Overview

Use static links to dynamically pull the latest media from your Dash Social Boards or LikeShop into email templates. This allows your emails to automatically display fresh content without manual updates. You can embed images or redirect links that always point to the most recent posts in a gallery.

## Link types

### Board Gallery Image

Fetch the latest image from a Board gallery.

```text theme={null}
https://likeshop.me/board/{board_id}/newest/{size}/{order_id}.jpeg
```

* **`board_id`**: Board gallery ID
* **`order_id`**: Position in reverse chronological order (`1` = newest)
* **`size`**: `thumbs` (400x400), `640` (640x640), `items` (full-size)

***

### Board Gallery Redirect URL

Fetch the redirect link for a Board image. Clicking opens the product page or Instagram post.

```text theme={null}
https://likeshop.me/board/{board_id}/url/newest/{order_id}
```

To choose a specific product link when multiple are tagged:

```text theme={null}
https://likeshop.me/board/{board_id}/url/newest/{order_id}/{link_id}
```

***

### LikeShop Gallery Image

Fetch the latest image from a LikeShop gallery.

```text theme={null}
https://likeshop.me/images/{instagram_handle}/newest/{size}/{order_id}.jpeg
```

* **`instagram_handle`**: Account username
* **`order_id`**: Position in reverse chronological order (`1` = newest)
* **`size`**: Same as above (`thumbs`, `640`, `items`)

***

### LikeShop Redirect URL

Fetch the redirect link for a LikeShop image.

```text theme={null}
https://likeshop.me/likeshop/{instagram_handle}/url/newest/{order_id}
```

To specify a particular product link:

```text theme={null}
https://likeshop.me/likeshop/{instagram_handle}/url/newest/{order_id}/{link_id}
```

***

## Example usage

```html theme={null}
<html>
  <body>
    <h2>Latest 3 Board Images</h2>
    <a href="https://likeshop.me/board/10307/url/newest/1">
      <img src="https://likeshop.me/board/10307/newest/thumbs/1.jpeg">
    </a>
    <a href="https://likeshop.me/board/10307/url/newest/2">
      <img src="https://likeshop.me/board/10307/newest/thumbs/2.jpeg">
    </a>
    <a href="https://likeshop.me/board/10307/url/newest/3">
      <img src="https://likeshop.me/board/10307/newest/thumbs/3.jpeg">
    </a>

    <h2>Latest 3 LikeShop Images</h2>
    <a href="https://likeshop.me/likeshop/dashsocial/url/newest/1">
      <img src="https://likeshop.me/images/dashsocial/newest/thumbs/1.jpeg">
    </a>
    <a href="https://likeshop.me/likeshop/dashsocial/url/newest/2">
      <img src="https://likeshop.me/images/dashsocial/newest/thumbs/2.jpeg">
    </a>
    <!-- Use the 3rd link for the 3rd photo -->
    <a href="https://likeshop.me/likeshop/dashsocial/url/newest/3/3">
      <img src="https://likeshop.me/images/dashsocial/newest/thumbs/3.jpeg">
    </a>
  </body>
</html>

```
