JSFiddle - React, Tailwind, and code Playground

by David Thomas

HTML

<img src="/folder1/folder2/image.jpg" alt="" />

JavaScript

$('img').each(
    function(){
        var src = $(this).attr('src');
        if (src.indexOf('/') === 0){
            this.src = src.substring(1);
        }
    });