Expand my Community achievements bar.

Accelerate your Campaign learning with the Adobe Campaign Mentorship Program 2023!

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