Loading a Product Collection’s media_gallery attribute

This is useful for loading a product’s gallery on the something like the listing page.

$product->getResource()->getAttribute('media_gallery')->getBackend()->afterLoad($product);