diff --git a/webapp/channels/src/components/threading/global_threads/thread_item/attachments/file_card/file_card.tsx b/webapp/channels/src/components/threading/global_threads/thread_item/attachments/file_card/file_card.tsx index 5042496642..c970b4c54b 100644 --- a/webapp/channels/src/components/threading/global_threads/thread_item/attachments/file_card/file_card.tsx +++ b/webapp/channels/src/components/threading/global_threads/thread_item/attachments/file_card/file_card.tsx @@ -8,7 +8,7 @@ import type {FileInfo} from '@mattermost/types/files'; import {getFileThumbnailUrl, getFileUrl} from 'mattermost-redux/utils/file_utils'; -import {FileTypes} from 'utils/constants'; +import Constants, {FileTypes} from 'utils/constants'; import {fileSizeToString, getCompassIconClassName, getFileType} from 'utils/utils'; import './file_card.scss'; @@ -37,6 +37,10 @@ function File({ enableSVGs, }: FileProps) { const imgSrc = useMemo(() => { + // Infomaniak > all images type from constants.IMAGE_TYPES can preview if they have not initial image preview and mini preview. + if (Constants.IMAGE_TYPES.includes(extension.toLowerCase()) && !hasPreviewImage && !miniPreview) { + return getFileUrl(id); + } if (!hasPreviewImage) { return undefined; }