JSFiddle - React, Tailwind, and code Playground
HTML
<img src="https://redirect.frontend.weborama.fr/redirect/standard?url=https://www.edf.fr/sites/default/files/styles/push_perso/public/contrib/EDFplus/2018/Nos_Vies_Electriques/1000x560-nos-vies-electriques.jpg?test={WEBO_CID}" id="img">
CSS
iframe.hidden { position: absolute; left: -1000px; width: 0; height: 0;
JavaScript
var img = document.getElementById("img");
getSrc(img.getAttribute("src"), function (realSrc) {
alert("Read src is: " + realSrc);
});
function getSrc(src, cb) {
var iframe = document.createElement("iframe"),
b = document.getElementsByTagName("body")[0];
iframe.src = src;
iframe.className = "hidden";
iframe.onload = function () {
var val;
try {
val = this.contentWindow.location.href;
} catch (e) {
val = "";
}
if (cb) {
cb(val);
}
b.removeChild(this);
};
b.appendChild(iframe);
}