JSFiddle - React, Tailwind, and code Playground

HTML

<div id="photos">
<img data-big="https://extraimage.net/images/2017/09/16/2d62338a05104eaa1e8f564efcf6ca80.jpg" src="https://img.youtube.com/vi/k4uVP1q0iro/mqdefault.jpg"/>
</div>

JavaScript

let images = document.querySelectorAll('img');

Array.prototype.forEach.call(images, function(el) {
        el.addEventListener("click", function(event) { 
            let bigImage = el.getAttribute('data-big');   
            let div = document.createElement('div');
            div.className = 'popup';
            div.innerHTML = '<img src="'+bigImage+'"/>';
            let photos = document.getElementById('photos');
            photos.appendChild(div);
        });  
});