JSFiddle - React, Tailwind, and code Playground

HTML

<div class="divclass">
    <img src="path1" />
    <img src="path2" />
    <img src="path3" />
</div>

JavaScript

$(document).ready(function(){
    $('div.divclass img').each(function(){
        var $this = $(this);
        $this.wrap('<a href="' + $this.attr('src') + '"></a>');
    });
});