To make display the photograph of the sender in message header, do the following:
Photograph Message Headers
The photograph of the sender of an email can be shown at the right side of the message preview if the sender is in one of your address books and has a photograph.
To enable this functionality, select Edit ▸ Preferences ▸ Mail Preferences ▸ Headers ▸ Show the photograph of sender in the message preview.
By default only local address books are used for searching the photograph as accessing remote address books can cause delays. You can disable this by deselecting the option Search for sender photograph only in local address books.
If there are multiple matches for a contact, the first one is always used.