Merged #507. Adds thumbnail caption support.