"""Return an image of the record, suitable for the Open Graph protocol.
Will look for any icon stored with the record, and will fallback to any
image file attached to the record. Returns nothing when no image is found.
Some optional structured properties are not considered, for optimizing both generation of the page
and page size.
@param max_photos: the maximum number of photos to display
@param one_icon_per_bibdoc: shall we keep just one icon per bibdoc in the output (not repetition of same preview in multiple sizes)?
@param twitter_card_type: the type of Twitter card: 'photo' (single photo) or 'gallery'. Fall back to 'photo' if not enough pictures for a 'gallery'.
@param use_webjournal_featured_image: if 'yes', use the "featured image" (as defined in bfe_webjournal_articles_overview) as image for the Twitter Card