JSFiddle - React, Tailwind, and code Playground

HTML

<img src='http://lorempixel.com/300/200/technics/' onmouseover='larger(this)' onmouseout='smaller(this)' />

CSS

img {
    transition-duration:.5s;
    width:auto;
    height:auto;
    position:relative;
}

JavaScript

/*
parseInt(getComputedStyle(this).getPropertyValue("width"))*2+"px";
*/

function larger(img) {
    img.style.width = (parseInt(getComputedStyle(img).getPropertyValue("width")) * 2) + "px";

    img.style.height = (parseInt(getComputedStyle(img).getPropertyValue("height")) * 2) + "px"
}

function smaller(img) {
    img.style.width = (parseInt(getComputedStyle(img).getPropertyValue("width")) / 2) + "px";
    img.style.height = (parseInt(getComputedStyle(img).getPropertyValue("height")) / 2) + "px"
}