Mikhail Ismajlov 08/05/2019

Often on the site you need to display the image in a popup window, for this in the Drupal there is a very popular Colorbox module:

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

composer require drupal/colorbox

drush en colorbox

After installation we need to go to the module folder, find the README.txt file and find a link to the colorbox library

/web/modules/contrib/colorbox

read me

colorbox

After downloading, you need to unzip and rename the colorbox-master folder to colorbox and put it in the libraries directory located in the root of the site. If you don't have this directory, create it.

colorbox

I have a Gallery content type with multiple Images fields, let's set the colorbox for this field:

manage display

We also have various display settings available

format settings

I've left them like this, you can put them under yourselves. You can also change the settings for yourself, which are in the module settings. I left the default settings

colorbox settings

I added a Gallery page to upload some photos:

gallery

That's what it looks like when you click it:

image

If you place the images in one line and add margin between them, they will look good.