---
title: "How to add a dynamic image to a text message"
description: "Learn how to add a dynamic image to an MMS message in Klaviyo."
canonical_url: "https://help.klaviyo.com/hc/en-us/articles/1260806102230"
markdown_url: "https://help.klaviyo.com/hc/en-us/articles/1260806102230.md"
locale: "en-us"
category: "SMS"
section: "Getting started with SMS flows"
updated: "2026-10-27"
---

# How to add a dynamic image to a text message

## You will learn

Learn how to add a dynamic image to an MMS message in Klaviyo. 

Including a dynamic image allows you to personalize your text messages. For instance, you can show someone the exact product they viewed, started a checkout with, or bought.

## Before you begin

Depending on your use case, you may not always be able to add a dynamic image. 

- Only metric-triggered flows can use dynamic images based on event data (e.g., items from a checkout or placed order) or on catalog tags for an event. 

- Campaigns and list- and segment-triggered flows can use image URLs stored as custom profile properties. They can also use catalog tags to look up an image from an item ID stored on the recipient’s profile.



Also, note the following about dynamic images:

- Only 1 dynamic image is allowed per MMS.

- Images should be under 600 KB. Larger images may be compressed by carriers, which can distort them, or fail to deliver.

- If you try to send a dynamic image with a sending number that doesn't allow for MMS, the message will send, but the image will be removed.

- If a dynamic image resolves to an empty or invalid URL, a message with text and no other attachment sends as SMS without the image. This fallback does not apply to previews, test sends, or messages using translations; those require a valid image URL.

- You can use conditional statements with dynamic images.

- Mobile carriers don't support WebP files, and attaching this type of image may cause the message to fail. 



## How to add a dynamic image

The steps below start from a flow message. For a draft campaign, open its text message editor and skip the first 2 steps.

1. Select the flow message where you want to include your dynamic image.

2. Next to **Content**, click **Edit**.



![Sidebar for a new SMS message in a flow](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/9e7e0dbd517c001fcfaebbbaf3842b47f945b769-866x332.png?auto=format)

3. If your editor shows RCS options, select **SMS fallback**. To edit its image separately, open **Content** and turn off **Use the same content from RCS message**.

4. Click **Preview** in the upper right corner.



![Image](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/bd2faf78dbeb76b1c2bac6787bf79170911b8490-2800x154.png?auto=format)

5. Choose a preview event or profile that contains the image URL, then expand **All properties**.

6. Click the image URL property to copy its variable. For a list of products or images, `0` identifies the first item and can appear in the middle of the variable.



![Image](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/8202fab2166709f673b263865cc57fb65f044786-862x332.png?auto=format)

7. Click **Done**. 

8. In the **Content** panel, turn on **Attachment** and select **Image** (or **Media** if shown).

9. Click **Select image** (or **Select media**). If an image is already attached, click **Replace**.



![Image](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/7b1e95089da87476e108905ba969eeda36f110a4-868x452.png?auto=format)

10. Go to the **Dynamic image** tab.

11. Paste the dynamic variable or dynamic URL for the image.




![Image](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/0286be227699e70f2ed46088aa7c8197164f93d0-2992x820.png?auto=format)

12. Click **Save**.

13. Click **Preview** and check that the expected image appears for the selected event or profile in a region that supports MMS.

14. Click **Done**, then **Next** to save the message and leave the editor.



**▸ Use catalog tags**

You can also use [catalog tags](https://help.klaviyo.com/hc/en-us/articles/360004785571.md) to add dynamic images in the MMS. To do so: 

1. In **Preview**, expand **All properties** and find the first product’s item ID in the event data. Use the identifier that matches the item in your Klaviyo catalog (a product ID or SKU, depending on the integration). For a profile-based image, find the custom profile property containing the item ID instead.

2. Copy this variable. 




![Image](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/6cb1d26751e957965e0d082cd2569fd6f712211f-806x300.png?auto=format)

1. Click **Done** to return to the SMS editor. 

2. In the **Content** panel, turn on **Attachment** and select **Image** (or **Media** if shown).

3. Click **Select image** (or **Select media**). If an image is already attached, click **Replace**.



![Image](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/7b1e95089da87476e108905ba969eeda36f110a4-868x452.png?auto=format)

1. Go to the **Dynamic image** tab.

2. Paste in the following catalog tag:
*{% catalog event.id %} {{catalog_item.featured_image.thumbnail.src}} {% endcatalog %}*

3. Replace *event.id* in *{% catalog event.id %}* with the variable from the tag you previously copied. Remove the outer brackets and the default filter, but keep any lookup filters needed to access the property (so *{{ event.extra.line_items.0.product_id|default:'' }}* becomes *event.extra.line_items.0.product_id*).
Example: *{% catalog event.extra.line_items.0.product_id %} {{catalog_item.featured_image.thumbnail.src}} {% endcatalog %}*

4. Click **Save**. 

5. Click **Preview** and check the image using an event or profile with the matching catalog item ID in a region that supports MMS. Click **Done**, then **Next** to save the message and leave the editor.

**▸ Example of using conditional statements**

Dynamic images can use conditional statements. 

Below is an example of an if/else statement to say that if there's a variant image, show that to recipients; else, use the default image:
{% if event.extra.line_items.0.product.variant.images.0.src %}{{ event.extra.line_items.0.product.variant.images.0.src }}{% else %}{{ event.extra.line_items.0.product.images.0.src }}{% endif %}

Note that the exact format for these statements depends on your integration, and you should not copy them from email templates.

## Additional resources

- [Understanding MMS image and GIF best practices](https://help.klaviyo.com/hc/en-us/articles/360041074911.md)
  Learn best practices for sending images and GIFs in text messages so that they display nicely to recipients. 
- [How to use event data to personalize email and SMS flows](https://help.klaviyo.com/hc/en-us/articles/115002779071.md)
  Learn what dynamic event data is, when to use it, where to find it, and how to include it in your flow messages. Learn about the different actions your customers take, and how you can use that data for creating personalized messaging flows in Klaviyo. For instance, you could use event data in an abandoned cart flow message to show individuals what product they left behind, an image of the item, and more. This allows for a more personalized experience for the customer, as well as a higher chance of conversion.
