AnsweredAssumed Answered

Populate image with link using Velocity script

Question asked by 29640c9a4270e977290def145220e02b36b6a650 on Sep 14, 2016
Latest reply on Sep 15, 2016 by sanford.whiteman

Anyone knows why the below script fails to populate an email with an image that has a URL?


<p style="text-align: center;"><a href="https://${contentUrl_1}?{{my.programUTM}}" target="_blank"><img src="${contentImageUrl_1}" alt="${contentImageText_1}" height="${contentImageHeight_1}" width="${contentImageWidth_1}" /></a><br /></p>

If I replace the 'href' section with something else than the image appears but the link will not work as the URL is not valid (see below).


<p style="text-align: center;"><a href="{{my.Content2_Link}}" target="_blank"><img src="https://${contentImageUrl_2}" alt="${contentImageText_2}" height="${contentImageHeight_2}" width="${contentImageWidth_2}" /></a><br /></p>


The URL used in the first version also works if used in a text.



If I replace the URL with a valid but short URL (e.g. than the link works but the image disappears (and all other velocity tokens in the same email tile also fail).


Any suggestions?