base64 image while creating email campaign

0 Votes

I am using V3 API. When I create an email campaign, as part of the request body's html_content, I have included a base64 image e.g. (this is just a sample html)

<html><body>[[trackingImage]]  <p><img src="data&colon;image/png;base64,iVBORw0KGgoAAAANSUhEUg ....... gg=="></p>  </body></html>. In this case the image is not included in the email. When I edit the campaign in the constant contact portal, I see that the "img src" is stripped out e.g. img src="#".

When I escape the base64 string, then the actual string is printed in the email instead of a image. Please help me on how to include an image while creating email campaign using the v3 API.

0 Votes



Thank you for reaching out to Constant Contact API Developer Support, and for your patience. My team is here to assist outside software developers with questions about building into Constant Contact's API.


It looks like your image URL may be trying to include the image file in the payload. You’ll need to host the image somewhere and then link to it. For image hosting, you can use your Constant Contact Library, your website, or another hosting service that is able to provide a compatible link for the image to be linked from.


Courtney E.
Tier II API Support Engineer

Did I answer your question?
If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.
Developer Portal

View API documentation, code samples, get your API key.

Visit Page


API Updates

Join our list to be notified of new features and updates to our V3 API.

Sign Up

How confident are you about the effectiveness of your current marketing strategy?

Top Choice: Not confident at all (62%)