Render externally hosted image in email campaign

Robbie_Law
Level 1

Hoping the community can guide us in the right direction with an issue we're having with our Marketo implementation.

We're syncing data to a contact from an external source via the API. Part of that data is a URL to an externally stored .png image. The image URL is different per contact. We're aiming to have that image displayed for each contact in a campaign we're running.

The issue we're having is actually getting that image to render in the email. We've tried two approaches so far:

1. Simply exposing the URL in the email template. This, not surprisingly, just renders the URL as a string.

2. Put the URL in the "src" attribute of an <img> tag. Unfortunately, this also didn't work either.

Any help would be very much appreciated.

Thanks.

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

Yes, what Josh said! Images in HTML emails are just <img> tags. If the src isn't showing, it's because the {{lead.token}} value is malformed. Perhaps it does not include the protocol, can't tell without examples.

Josh_Pickles
Level 7

Hi Robbie,

We store URL variables for image files against lead records within Marketo all the time to use within email. We use tokens to pull them through into the <img src="" /> path - could you please show us the snippet where it's not displaying - and perhaps an example of the URL variable that is being uploaded?