You just need to execute below code, Here I am just replave image src with image url, after replacing src
(function(){
var a = document.getElementsByTagName('img');
for(e of a){
let t = e.src;
e.src = t.replace(/(http|https|file:\/\/)?(\/.*\.(?:png|jpg))(.*)/i, '$2');
}
}())
Here I am changing:
/media/files/eguide_assets/final-fantasy-xii-the-zodiac-age-eguide/085-105_walkthrough-web-resources/image/wi01.png/PRIMAP/resize/700x-1%3E
to
/media/files/eguide_assets/final-fantasy-xii-the-zodiac-age-eguide/085-105_walkthrough-web-resources/image/wi01.png
Then url taking File from relative path that is why I am using file path,
If this image in you relative folder then you will get image, Else you need to add base url with the relative path
as https://primagames.com/ then relative path mean code will change to :
(function(){
var a = document.getElementsByTagName('img');
for(e of a){
let t = e.src;
e.src = `https://primagames.com${t.replace(/(http|https|file:\/\/)?(\/.*\.(?:png|jpg))(.*)/i, '$2')}`;
}
}());
It will work for you.
For Only remove extra stuff from image url, that is "/PRIMAP/resize/700x-1%3E", You can do below code
(function(){
var a = document.getElementsByTagName('img');
for(e of a){
let t = e.src;
e.src = t.replace(/([\w-]+\.(jpg|png|txt))(.*)/i, '$1');
}
}())