How to use Liquid to show images from an activity's attribute
Overview
It is possible to display an image in a campaign’s email message, where this image is sourced from an activity’s attribute, whose value is a image URL.
Consider a custom activity named Booked trip, which includes the following attributes:
Booked trip (name of activity)
Trip name
Destination
Destination image (containing a valid image URL)
Arrival date
Departure date
After a customer completes their booking, a confirmation email message can be sent that displays all details of the activity's attributes for the booked trip including the destination image (above).
How to display an image from an activity attribute in an email
To display an image from an activity’s attribute in an email message for a playbook, journey or email campaign:
4. Replace LIQUID-SYNTAX-FOR-YOUR-ACTIVITYS-ATTRIBUTE-WITH-IMAGE-URL with Liquid syntax generated in step 1 above.
Example of how to add an HTML block in the email editor.
TIP: If the availability of a valid image URL for this activity’s attribute cannot be guaranteed, you can use Liquid syntax’s [default] filter to specify a fallback image, e.g.