URL added to images for email not being added

We use a template for our email campaigns and I would like to add a URL to each of my images in the email. Using the email window there is an optional box for URL which I’ve populated but when I either preview the email or send it the links aren’t on the images.

I attach a screenshot of my settings - what am I missing?

Thanks

Susan

Hi @susancorless ,

That certainly should work. Which template are you using? Developed in-house, a standard one provided by HubSpot or one created by a third-party?

It could be that the template wasn’t setup to actually do anything with the link field for images, in which case the template itself will just need a small tweak in Design Manager (if you have access to do so).

Thanks,

Mike

PS: If you are going to tweak the template in Design Manager, I’d recommend you (or a developer) make a custom field for the CTA URL, which can then be added just once, but used in three places (wrapping the image, wrapping the headline and wrapping ‘Read More’), because it is SO EASY to forget to update one of those when you’re creating new emails and it often slips through tests too. If there’s just one field, you remove that problem. I speak from painful experience :slightly_smiling_face:

Hi Mike

We’re using one that was set up in house, so I have access to the design manager to make changes to the template.

I did wonder whether that was what I needed to do. My HTML expert is on furlough leave right now, so I’ll most likely make a copy to test with first & that way I won’t break the original template.

Thanks for the tip too!

Hi @susancorless ,

Yep, that sounds like what it is then. Making a copy is smart - then you can play around to your heart’s content.

The below may help, this is how I generally set it up. Notice that the text module named “cta_2_url” has exactly the same name in all three locations. That ensures you only get one control in the finished email, and the same URL will be added three times to the final output. Also that no_wrapper parameter ensures HS doesn’t wrap everything inside its own wrappers, which can cause some issues, especially with emails.

<a href="{% text "cta_2_url" label="CTA 2 Button URL", value="URL Here", no_wrapper=true %}">
{% image "cta_2_image" label='CTA 2 image', alt='', src="https://cdn2.hubspot.net/A_DEFAULT_IMAGE_WOULD_GO_HERE.jpeg" width="310" height="" border="0" style="width: 100%; max-width: 310px; height: auto; background: #dddddd;" class="center-on-narrow" %}
</a>

...

<h4>
<a href="{% text "cta_2_url" label="CTA 2 Button URL", value="URL Here", no_wrapper=true %}">{% text "cta_2_headline" label="CTA 2 Headline", value="My Article Title", no_wrapper=true %}</a>
</h4>

...

<p>
<a href="{% text "cta_2_url" label="CTA 2 Button URL", value="URL Here", no_wrapper=true %}">Read more</a>
</p>

Hope that helps!

Thanks,

Mike

---

Did I answer your question? If your question is answered, please mark it as a solution. If you need more help, hit that big orange ‘Reply’ button!