diff --git a/src/components/Attachment/AttachmentImage.js b/src/components/Attachment/AttachmentImage.js index e04d9982..4495a51c 100644 --- a/src/components/Attachment/AttachmentImage.js +++ b/src/components/Attachment/AttachmentImage.js @@ -11,7 +11,7 @@ export const isImage = (attachment) => { if(attachment.file) { return attachment?.file?.type?.toLowerCase()?.startsWith("image"); } else { - return attachment.fileMetadataDescription === "image"; + return attachment.fileMetadataDescription?.toLowerCase()?.startsWith("image"); } } diff --git a/src/components/log/EntryEditor/Description/OlogAttachment.js b/src/components/log/EntryEditor/Description/OlogAttachment.js index 81858259..85e5d503 100644 --- a/src/components/log/EntryEditor/Description/OlogAttachment.js +++ b/src/components/log/EntryEditor/Description/OlogAttachment.js @@ -49,7 +49,7 @@ export default class OlogAttachment{ } this.url = URL.createObjectURL(file); } - if(this.fileMetadataDescription === "image") { + if(this.fileMetadataDescription?.toLowerCase()?.startsWith("image")) { this.isImage = true; } }