Fixed image upload for missing images
This commit is contained in:
parent
ebefe894ee
commit
754f99e880
@ -109,7 +109,13 @@ function previewImage(file: File, endpoint: string, previews: HTMLCollectionOf<E
|
|||||||
for(let preview of previews) {
|
for(let preview of previews) {
|
||||||
let img = preview as HTMLImageElement
|
let img = preview as HTMLImageElement
|
||||||
img.classList.remove("hidden")
|
img.classList.remove("hidden")
|
||||||
|
|
||||||
|
// Make not found images visible again
|
||||||
|
if(img.classList.contains("lazy")) {
|
||||||
img.classList.remove("element-not-found")
|
img.classList.remove("element-not-found")
|
||||||
|
img.classList.add("element-found")
|
||||||
|
}
|
||||||
|
|
||||||
img.src = reader.result
|
img.src = reader.result
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user