@mykle1 sorry, you are using some words that don’t describe well what the problem is…
i THINK you said
when I try to load image files (local to the MM system), I use a URL string.
that URL string is 'relative' to the base of my server, defined by '??????' (you didn't supply that)
when a URL fails to load, I get error 404. (not found).
but how do I handle this?
you would add an onerror() handler for the img object
this will get called ONLY when there is an error
img.onerror = funtion(event_object){
var img_with_error = event_object.currentTarget
img_with_error.src=??? the url of the failing image
}
see https://www.w3schools.com/jsref/obj_event.asp
for more info in decoding the event object