I am writing a script that replaces web page images with webp format. I have control only over my javascript which I can place where ever I want. My question is how to stop completely image load with javascript? I tried to do like this:
let images = document.querySelectorAll('img');
for (let img of images) {
img.src = '';
}
But when I open the network tab, browsers still download images.