I'm not sure why it didn't work for me, but when I changed the script, the image did appear.
Is it possible to add the styling within the velocity script or would it need to be added within the email?
I added the styling within the email as shown below and it's not working:
Any suggestions?
Thank you,
LK
Well, you can output the plain image URL from the velocity script token in the already existing image tag of your editable module, or you can also copy over the styles from here to the image tag in the velocity script token (in this case, you'd have to remove the already existing image tag in your editable module, as it's gonna be part of the velocity script). It's up to you how you want to do it. For the former case (i.e., just output the image URL from the velocity token), your script would look like something below. Add this velocity my token in the src attribute of the image tag in the editable module in the email and you should be good. Looking at your use-case you're better off with approach 1, i.e., outputting the image URL from the velocity token and plugging the token in the src attribute as I discussed above.
#if(!$lead.DestinationImageLink.isEmpty())
#set($imageURL = $lead.DestinationImageLink)
#else
#set($imageURL = "https://cdn3.redweek.com/photos/full/3/6/4/364719.jpg?1")
#end
${imageURL}
Thanks Darshil,
I just used the latest script you pasted in and this is what I see in email preview mode:
Did you add the velocity token in the src attribute of the image tag? See an e.g., below:
<img src="{{my.velocity-token}}" style="" alt="Cool Destinations">
Happy to hop on a quick call if you feel that'd be more convenient. DM me in that case.
Hi Darshil,
I sent you a PM...Please let me know what your availability is.
Thanks so much,
LK
Thank you, Darshil, for helping me resolve this issue 🙂