Alt Text and Gallery Pro

I want more control over the alt text and want to retrieve it and the caption from the image’s IPTC data so I’ve been doing some experiments. Maybe this is of interest to others so …

Note that I am not manually including any text in any of the fields associated with the image in the resources, the data is only coming from the IPTC data in the image. I have enabled Caption in the Lightbox Meta Data but not Author (or Exif). Thumbnails Meta Data is hidden and I’m looking at the generated HTML.

Firstly with no additional data in the image there is no caption HTML produced and the alt text is set to the file name of the image.

If you include a Title entry in the IPTC then again there is no caption and the alt text is the file name.

Same deal if you fill in the Headline field.

If you add text to the Description field then it appears as the caption and the alt text (as well as appearing in the Caption field).

For completeness if you enter a Creator field then that appears in the Author field and if you don’t have a Description field then it becomes the alt text.

I would have thought enabling the Caption but not including any text would have still generated the Caption HTML but it doesn’t. To me that’s a bug but it’s probably considered a “feature”.