aboutsummaryrefslogtreecommitdiff
path: root/src/components/attachment
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/attachment')
-rw-r--r--src/components/attachment/attachment.js3
-rw-r--r--src/components/attachment/attachment.vue2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js
index 2698fb67..d16e5086 100644
--- a/src/components/attachment/attachment.js
+++ b/src/components/attachment/attachment.js
@@ -26,6 +26,9 @@ const Attachment = {
usePlaceHolder () {
return this.size === 'hide' || this.type === 'unknown'
},
+ referrerpolicy () {
+ return this.$store.state.instance.mediaProxyAvailable ? '' : 'no-referrer'
+ },
type () {
return fileTypeService.fileType(this.attachment.mimetype)
},
diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue
index 74993fd9..ad5120c0 100644
--- a/src/components/attachment/attachment.vue
+++ b/src/components/attachment/attachment.vue
@@ -19,7 +19,7 @@
:href="attachment.url" target="_blank"
:title="attachment.description"
>
- <StillImage :class="{'small': isSmall}" referrerpolicy="no-referrer" :mimetype="attachment.mimetype" :src="attachment.large_thumb_url || attachment.url"/>
+ <StillImage :class="{'small': isSmall}" referrerpolicy="referrerPolicy" :mimetype="attachment.mimetype" :src="attachment.large_thumb_url || attachment.url"/>
</a>
<a class="video-container"