If image 'src' is '(unknown)' replace with 'missing.png'
This should work for you, if you use onError
event for handling missing image src
<img src="main_img.png" onError="this.onerror=null;this.src='/images/missing.png';" />
I used this to solve a similar problem I had (using javascript)...
const images = document.querySelectorAll("img");
images.forEach((image) => {
let imgsrc = image.getAttribute("src");
if (imgsrc === "") {
image.src = "/images/missing.png";
}
});