diff --git a/src/components/messages/MessageIncomingImage.vue b/src/components/messages/MessageIncomingImage.vue
index fb7e56c..b0ebd7e 100644
--- a/src/components/messages/MessageIncomingImage.vue
+++ b/src/components/messages/MessageIncomingImage.vue
@@ -7,7 +7,7 @@
}}
-
+
@@ -33,6 +33,8 @@ export default {
data() {
return {
src: null,
+ cover: true,
+ contain: false
};
},
mounted() {
@@ -42,6 +44,16 @@ export default {
util
.getThumbnail(this.$matrix.matrixClient, this.event, width, height)
.then((url) => {
+ const info = this.event.getContent().info;
+ // JPEGs use cover, PNG and GIF ect contain. This is because PNG and GIF are expected to
+ // be stickers and small emoji type things.
+ if (info && info.mimetype && info.mimetype.startsWith("image/jp")) {
+ this.cover = true;
+ this.contain = false;
+ } else {
+ this.cover = false;
+ this.contain = true;
+ }
this.src = url;
})
.catch((err) => {