diff --git a/webapp/components/post_view/components/post_attachment_opengraph.jsx b/webapp/components/post_view/components/post_attachment_opengraph.jsx index 20beaed511..b83150839a 100644 --- a/webapp/components/post_view/components/post_attachment_opengraph.jsx +++ b/webapp/components/post_view/components/post_attachment_opengraph.jsx @@ -81,6 +81,10 @@ export default class PostAttachmentOpenGraph extends React.Component { } getBestImageUrl() { + if (this.state.data.images == null) { + return null; + } + const nearestPointData = CommonUtils.getNearestPoint(this.imageDimentions, this.state.data.images, 'width', 'height'); const bestImage = nearestPointData.nearestPoint;