Expand my Community achievements bar.

The 5th edition of the Campaign Community Lens newsletter is out now!

Embedding images with JavaScript variables


Level 1

Hello - I'm sending a daily email where I'd like to embed an image whose path changes every day. The image should be the same for all recipients, it is not personalized.

The image is included in the HTML source like so, using a JavaScript variable:

<img src="http://foo.bar/images/<%= ctx.imagePath %>.png" />

When using the script block/variable in the HTML img src path, image detection is not working and the image is not embedded.

How should we do this?

Thank you.

0 Replies
page footer