# Adding personalised token to email image using source code

**URL:** <https://community.hubspot.com/t/adding-personalised-token-to-email-image-using-source-code/30107>\
**Category:** CMS Development\
**Tags:** professional\
**Created:** [January 13, 2021, 1:36am UTC](https://community.hubspot.com/t/adding-personalised-token-to-email-image-using-source-code/30107 "2021-01-13T01:36:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Latitude37](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/latitude37/32/77566_2.png) [@Latitude37](https://community.hubspot.com/u/Latitude37)\
**Post date:** [January 13, 2021, 1:36am UTC](https://community.hubspot.com/t/adding-personalised-token-to-email-image-using-source-code/30107/1 "2021-01-13T01:36:05Z")

</div>

Hi all,

I feel like im close to finding the solution but i need your help.

Im wanting an image to link to a personalised token. That personalised token will be a url which ive setup simply as a single line text property. I know there is no way of doing this within the module settings that are available, but i should be able to do this within the images source code.

Disclaimer; Ive successfully tested and created the html code with the html-edit which worked with the following code:  
\<a href=“{{ contact.promo\_unique\_url}}”\>ActivatePromo\</a\>\<p\>

But basically what i want to do is impelment this onto an image which will act as a button for the recipient to click on, which will then go to their unique url based on the property ive setup.

Im sure there is an easy way for me to access source code for the image in a email but i cant seem to find it. Where am i able to edit an images source code to include the code above, enabling my button to link to the unique url i setout in my custom property?

---

<div class="post-metadata">

**Author:** ![Bryantworks](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/bryantworks/32/94963_2.png) [@Bryantworks](https://community.hubspot.com/u/Bryantworks)\
**Post date:** [January 13, 2021, 2:46pm UTC](https://community.hubspot.com/t/adding-personalised-token-to-email-image-using-source-code/30107/2 "2021-01-13T14:46:41Z")

</div>

Hey @Latitude37,

If you’re using the drag and drop builder, you can paste your “{{ contact.promo\_unique\_url}}” into the “Link (Optional)” field here on the image sidebar:

 ![36351i4B762A5C497349BE.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/b/6/b697237dedfefd699cc2b2307fdf631d96b991fc.png)

If you’re using the CMS, you should still be able to access the link function in a similar manner. Hope this helps!

---

<div class="post-metadata">

**Author:** ![Latitude37](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/latitude37/32/77566_2.png) [@Latitude37](https://community.hubspot.com/u/Latitude37)\
**Post date:** [January 14, 2021, 3:29am UTC](https://community.hubspot.com/t/adding-personalised-token-to-email-image-using-source-code/30107/3 "2021-01-14T03:29:00Z")

</div>

Thankyou very much, this worked! now that i know you can use properties in this manner, it opens up a whole new world, amazing, thankyou!

---

<div class="post-metadata">

**Author:** ![sseddar](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@sseddar](https://community.hubspot.com/u/sseddar)\
**Post date:** [January 30, 2023, 5:29pm UTC](https://community.hubspot.com/t/adding-personalised-token-to-email-image-using-source-code/30107/4 "2023-01-30T17:29:42Z")

</div>

Hello  
I would like to know if I can create an email marketing where I will insert an image of a property of a company, they show propose to change the source code and I changed but the problem every time I change it does not save.

this is the screenshot.

 ![sseddar_0-1675099549364.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/a/a971763890fa112bbb521532b8510635cbc57f7f.png)

when I save and I return to the source code I find that it is not saved

 ![sseddar_1-1675099715728.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/2X/d/d74ccfb8939c8cd7ff4ac7b5c11312d99e84e5a3.jpeg)

---

<div class="post-metadata">

**Author:** ![Bryantworks](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/bryantworks/32/94963_2.png) [@Bryantworks](https://community.hubspot.com/u/Bryantworks)\
**Post date:** [January 14, 2021, 2:28pm UTC](https://community.hubspot.com/t/adding-personalised-token-to-email-image-using-source-code/30107/5 "2021-01-14T14:28:04Z")

</div>

Very welcome @Latitude37! Would you mind accepting this as a solution so others can find it in the future?
