Set Fallback Image for broken Thumbnails (#50)
* Set Fallback Image for broken Thumbnails * Transparent placeholder * Added some comments
This commit is contained in:
4
public/notFound.svg
Normal file
4
public/notFound.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!-- Transparent placeholder as fallback for unsuccessful image loads -->
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="12" height="12">
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 199 B |
@@ -36,7 +36,8 @@ export default function SpinnerImage(props: IProps) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
img.onerror = () => {
|
img.onerror = () => {
|
||||||
setImagsrc('Not Found');
|
// Setting to an actual image so CSS styling works consistently
|
||||||
|
setImagsrc('/notFound.svg');
|
||||||
};
|
};
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user