Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

The 4th 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="<%= 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