JSFiddle - React, Tailwind, and code Playground

HTML

<div>
	<p>This is a test</p>
	<img class="mod-trigger" src="http://placeimg.com/98/100/animals" />
	<a href="http://placeimg.com/98/100/animals">View the Image</a>
</div>
<div>
	<p>This is a test</p>
	<img class="mod-trigger" src="http://placeimg.com/100/95/animals" />
	<a href="http://placeimg.com/100/95/animals">View the Image</a>
</div>
<div>
	<p>This is a test</p>
	<img class="mod-trigger" src="http://placeimg.com/95/95/animals" />
	<a href="http://placeimg.com/95/95/animals">View the Image</a>
</div>
<div id="msg"></div>

<!-- Modal -->
<div class="modal fade" id="gallery-lightbox" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title" id="myModalLabel"><?= $gallery['name'];?></h4>
			</div>
			<div class="modal-body">
				...
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
			</div>
		</div>
	</div>
</div>
<!-- ./Model -->

CSS

DISABLED#msg{position:absolute;top:30%;left:40%;}

JavaScript

/*
	Note that there is a several-second DELAY before 
	placeimg.com displays the image in the modal
*/

$('.mod-trigger').click(function(){
   var i = $(this).next('a').attr('href');
	//alert(i);
	$('.modal-body').html('<img src="'+i+'" class="msg" width="200" height="200" />');
	$('#gallery-lightbox').modal('show');
});