Don't bother sending a RemoteUrl for DM images if they're not downloaded yet, since they can't be loaded without an authentication token anyway
This commit is contained in:
parent
5c79decd7b
commit
8d29e25823
@ -37,12 +37,10 @@
|
|||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{range .Images}}
|
{{range .Images}}
|
||||||
|
{{/* DM images can only be loaded with an authenticated session. So sending the RemoteUrl
|
||||||
|
in an <img> tag is not useful; it will just HTTP 401 */}}
|
||||||
<img class="dm-message__embedded-image"
|
<img class="dm-message__embedded-image"
|
||||||
{{if .IsDownloaded}}
|
src="/content/images/{{.LocalFilename}}"
|
||||||
src="/content/images/{{.LocalFilename}}"
|
|
||||||
{{else}}
|
|
||||||
src="{{.RemoteURL}}"
|
|
||||||
{{end}}
|
|
||||||
width="{{.Width}}" height="{{.Height}}"
|
width="{{.Width}}" height="{{.Height}}"
|
||||||
onclick="image_carousel.querySelector('img').src = this.src; image_carousel.showModal();"
|
onclick="image_carousel.querySelector('img').src = this.src; image_carousel.showModal();"
|
||||||
>
|
>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user