Append missing alt attribute content to attachment metadata

Uses the same method as is used for constructing image tags.