Is there a way to add captions to images? | Community
Skip to main content
September 12, 2013
Question

Is there a way to add captions to images?

  • September 12, 2013
  • 3 replies
  • 1510 views
I'd like to add a caption to one of the images in an email we're sending today.

Can anyone tell me if marketo has that functionality?

Many thanks!
Alexis
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

September 12, 2013
Emails: you can add text that is displayed when users move the mouse over the image and image description that is displayed when the recipient has images blocked by default.
 
When you insert or double click an image it opens the dialog box "insert/edit image".
 
Title is displayed when users move the mouse over.
 
Image description is the text displayed when the email client can not display images or blocks by default.
 
The tags generated behind the scenes are img title="Image title" and the description is alt="image description"



jQuery is the simplest and quickest solution for Landing Pages:

The image is defined as
<img src="my_image.jpg" alt="" class="hascaption" title="image caption" />


A HTML block sets the caption

$(document).ready(function() {
  $("img.hascaption").each(function() {
  $(this).wrap('<div class="figure"></div>')
  .after('<p class="caption">'+$(this).attr("title")+'</p>')
  .removeAttr('title');
  });
  $(".figure").width($(this).find('img').width());
});
 

 
September 12, 2013
Nice solution, but probably overkill.

You can wrap your image in a container (like a <div> tag) and add a caption underneath it.

<div id="picture-container">
     <img src="path/to/myimage.png" />
     <p>Here's a Caption!</p>
</div>
September 12, 2013
Fanstatsic. Thank you!