I'd like to request that the ability to display image captions be added to this module. I recommend copying what Colorbox has done and allowing users to select captions as being 'automatic' (image title, alt or node title used), 'image title', 'image alt tag', 'node title', or 'none'.

This would be especially useful when integrating with Colorbox.

CommentFileSizeAuthor
#5 image_captions-1695554-5.patch661 bytesAnonymous (not verified)

Comments

maciej.zgadzaj’s picture

Status: Active » Closed (works as designed)

You can use anything you like as a "caption" right now - just add for example Content: Title field to your view (make sure that it is added after image, so that it will be displayed over it) and format it in a way you like using CSS.

Anonymous’s picture

Status: Closed (works as designed) » Active

Sorry, I was referring to when using Image Matrix as a field formatter in a content type. I had Alt tags enabled for my images but there didn't seem to be a way to display them...

maciej.zgadzaj’s picture

Status: Active » Fixed

Feature added in the most recent dev version, just pushed to d.o.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new661 bytes

The changes you committed did add an extra div showing the alt and title text, but that doesn't actually solve the problem of displaying the alt or title text as a caption in Colorbox.

I've worked out that to display a caption, Colorbox simply takes the alt or title text and adds it as the title attribute of the link (as opposed to the image). You code was already adding the image's title text as a title attribute, but it wasn't doing it for the alt text too.

The attached patch adds the alt text of the image as the title attribute of the link if there isn't already a title attribute set. This solves the problem for me.

maciej.zgadzaj’s picture

Status: Needs review » Fixed

Thanks Peter, patch applied, new dev version just pushed to d.o.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.