JSFiddle - React, Tailwind, and code Playground

by kachibito

HTML

<img src="http://kachibito.net/wp-content/uploads/2012/05/simpler000.jpg">

JavaScript

$('img').each(function() {
          var t = $(this);
        t.attr('src', t.attr('src').replace(/(\.[a-z]+)$/i, "@2x$1"));
      });