JSFiddle - React, Tailwind, and code Playground
HTML
<img src="http://placekitten.com/200/200"/>
<br />
<a href="#">Enable</a>
CSS
.ui-wrapper {
position : relative!important;
}
.ui-resizable-se {
position : absolute;
bottom : 0;
right : 0;
width : 6px;
height : 6px;
background-color : white;
border: 1px solid black;
cursor: se-resize;
}
img {
border: 5px solid red;
}
JavaScript
var active = false;
var img = $('img');
$('a').click(function() {
if(active) {
img.resizable('destroy');
$('a').text('Enable');
} else {
img.resizable();
$('a').text('Disable');
}
active = !active;
});