Today I was muddling around with gallery images’ captions/alt text/descriptions. I came to realize that I had no clue in what order WordPress retrieved the alt text for attachments; I knew from experience that it checked several places. The order is:
- Use Alt field first
- If not, Use the Caption
- Finally, use the title
This comes straight from the comments of `wp_get_attachment_image` as of WP 3.7 RC2.