JSFiddle - React, Tailwind, and code Playground

by wrxsti85

HTML

<img src="http://diy-code.com/kronum/wp-content/uploads/2012/09/McGrath-220x140.jpg" alt="McGrath" title="McGrath" class="entry-image attachment-post-thumbnail wp-post-image">

JavaScript

$(function(){
    setTimeout(function(){
        var url= $('.entry-image').attr('src');

        var index = url.lastIndexOf('-220x140');  //get last index of language
        var substr = url.substr(index);        //get substring of the tail
        var newsubstr = substr.replace('-220x140','');  //use replace to get rid of second lang
        var newurl = url.substr(0,index-0); //first part of the url
        var cleanurl = newurl + newsubstr;  //concatenate it
        $('.entry-image').attr('src',cleanurl);
    },2000);
});