<script type="text/javascript" async>
////add Attrs alt to images
function addAltAttrs() {
//get the images
let images = document.querySelectorAll("img");
//loop through all images
for (let i = 0; i < images.length; i++) {
//check if alt missing
if ( !images[i].alt || images[i].alt == "" || images[i].alt === "") {
//add file name to alt
images[i].alt = images[i].src.match(/.*\/([^/]+)\.([^?]+)/i)[1];
}
}
// end loop
}
</script>