The best Drupal modules to show image and video contents in an overlay gallery

Magnific Popup ( Drupal 8 and 7)
Integrate Dmitry Semenov's Magnific Popup jQuery lightbox plugin with Drupal as a field formatter. This module provides a "Magnific Popup" field formatter for File Entity and Image fields. Fields with multiple items (cardinality > 1) can be grouped into a Magnific Popup gallery, or shown individually as a stand-alone popup (no "previous"/"next" navigation options). Magnific Popup is a responsive jQuery lightbox plugin that is focused on performance and providing best experience for user with any device (Zepto.js compatible).

https://www.drupal.org/project/magnific_popup

Colorbox (Drupal 8 and 7)
Colorbox is a light-weight customizable lightbox plugin for jQuery. This module allows for integration of Colorbox into Drupal. Images, iframed or inline content etc. can be displayed in a overlay above the current page.

https://www.drupal.org/project/colorbox

Lightbox2 (Drupal 7)
The Lightbox2 module is a simple, unobtrusive script used to overlay images on the current page. It's a snap to setup and works on most modern browsers. The module places images above your current page, not within. This frees you from the constraints of the layout, particularly column widths. It keeps users on the same page. Clicking to view an image and then having to click the back button to return to your site is bad for continuity (and no fun!).

https://www.drupal.org/project/lightbox2

Shadowbox (Drupal 7)
Shadowbox is an online media viewer application that supports all of the web’s most popular media publishing formats. Shadowbox is written entirely in JavaScript and CSS and is highly customizable. Using Shadowbox, website authors can showcase a wide assortment of media in all major browsers without navigating users away from the linking page.

https://www.drupal.org/project/shadowbox

See also: https://drupal.org/node/266126

Drupal colorbox
Taxonomy: 

Drupal themes to be compared