JSFiddle - React, Tailwind, and code Playground

HTML

<img src="http://example.ru/01/kmg05-300x214.jpg" class="attachment-portfolio-three" alt="kmg05">

JavaScript

$(document).ready(function() {
    var img = $('.attachment-portfolio-three');
    var source = img.attr('src');
    if (source.toLowerCase().indexOf("-300x214") >= 0)
    {
        source = source.replace("-300x214", "");
        img.attr("src", source);
    }
});