fix layout issue with blocked media

This commit is contained in:
Nolan Lawson 2018-02-11 22:59:33 -08:00
parent be16ebfa78
commit d12b39963b
1 changed files with 4 additions and 1 deletions

View File

@ -51,7 +51,7 @@
on:imgLoad="set({imageLoaded: true})"
on:imgLoadError="set({imageError: true})"
alt="{{media.description || ''}}"
src="{{media.preview_url}}"
src="{{imageError ? oneTransparentPixel : media.preview_url}}"
width="{{inlineWidth}}"
height="{{inlineHeight}}"
/>
@ -152,6 +152,9 @@
showImageDialog(media.preview_url, media.url, media.type, width, height, media.description)
}
},
data: () => ({
oneTransparentPixel: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII='
}),
events: {
imgLoad,
imgLoadError,