diff --git a/src/components/util/SpinnerImage.tsx b/src/components/util/SpinnerImage.tsx index 0cda0f3c..569b9d08 100644 --- a/src/components/util/SpinnerImage.tsx +++ b/src/components/util/SpinnerImage.tsx @@ -14,6 +14,7 @@ import { Theme, SxProps, Stack, Button } from '@mui/material'; import BrokenImageIcon from '@mui/icons-material/BrokenImage'; import RefreshIcon from '@mui/icons-material/Refresh'; import { useTranslation } from 'react-i18next'; +import ImageIcon from '@mui/icons-material/Image'; import { requestManager } from '@/lib/requests/RequestManager.ts'; import { defaultPromiseErrorHandler } from '@/util/defaultPromiseErrorHandler.ts'; import { Priority } from '@/lib/Queue.ts'; @@ -33,6 +34,8 @@ export const SpinnerImage = forwardRef((props: IProps, imgRef: ForwardedRef(undefined); @@ -48,6 +51,10 @@ export const SpinnerImage = forwardRef((props: IProps, imgRef: ForwardedRef { + if (showMissingImageIcon) { + return () => {}; + } + let tmpImageSourceUrl: string; const imageRequest = requestManager.requestImage(src, Priority.HIGH); let cacheTimeout: NodeJS.Timeout; @@ -121,17 +128,28 @@ export const SpinnerImage = forwardRef((props: IProps, imgRef: ForwardedRef )} - {alt} + {showMissingImageIcon ? ( + theme.palette.background.default }} + > + + + ) : ( + {alt} + )} ); });