diff --git a/src/components/views/messages/MImageBody.js b/src/components/views/messages/MImageBody.js index 848cad6fb6..e89c6d2bc9 100644 --- a/src/components/views/messages/MImageBody.js +++ b/src/components/views/messages/MImageBody.js @@ -338,15 +338,17 @@ export default class MImageBody extends React.Component { // By doing this, the image "pops" into the timeline, but is still restricted // by the same width and height logic below. if (!this.state.loadedImageDimensions) { - let imageElement = ( - {content.body} - ); + let imageElement; if (!this.state.showImage) { imageElement = ; + } else { + imageElement = ( + {content.body} + ); } return this.wrapImage(contentUrl, imageElement); }