Fixed image upload for missing images

This commit is contained in:
Eduard Urbach 2018-04-24 02:51:00 +02:00
parent ebefe894ee
commit 754f99e880

View File

@ -109,7 +109,13 @@ function previewImage(file: File, endpoint: string, previews: HTMLCollectionOf<E
for(let preview of previews) {
let img = preview as HTMLImageElement
img.classList.remove("hidden")
img.classList.remove("element-not-found")
// Make not found images visible again
if(img.classList.contains("lazy")) {
img.classList.remove("element-not-found")
img.classList.add("element-found")
}
img.src = reader.result
}
}