JSFiddle - React, Tailwind, and code Playground

HTML

<button id="grow" >Bigger</button>
<button id="shrink">Smaller</button>
<p><img id="img1" src="#"  /></p>

JavaScript

$('#grow').click(function() {
            var srcImg = $("#img1");
            var imageWidth = srcImg.width();
            var imageHeight = srcImg.height();
            imageWidth = imageWidth * 1.1;
            imageHeight = imageHeight * 1.1;
            $("#img1").css({ "width": imageWidth, "height": imageHeight });
});

$('#shrink').click(function() {
            var srcImg = $("#img1");
            var imageWidth = srcImg.width();
            var imageHeight = srcImg.height();
            imageWidth = imageWidth * 0.9;
            imageHeight = imageHeight * 0.9;
            $("#img1").css({ "width": imageWidth, "height": imageHeight });
});