I have a multiple language site. With html, javascript, may be ajax if an image does not exist in spanish folder, it should load image from the english folder.
path example english site : images/home.jpg spanish site : es/images/home.jpg
Today i have message.properties ... stuff for doing text conversion message.properties message_es.properties
You can use onerror for the image
<img src="es/images/home.jpg" onerror="this.src='images/home.jpg'">
but, IMHO, it is better to do the job on server side