diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js
index 8a2a3826..cd72e571 100644
--- a/src/components/attachment/attachment.js
+++ b/src/components/attachment/attachment.js
@@ -1,3 +1,4 @@
+import StillImage from '../still-image/still-image.vue'
import nsfwImage from '../../assets/nsfw.png'
import fileTypeService from '../../services/file_type/file_type.service.js'
@@ -16,6 +17,9 @@ const Attachment = {
img: document.createElement('img')
}
},
+ components: {
+ StillImage
+ },
computed: {
type () {
return fileTypeService.fileType(this.attachment.mimetype)
diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue
index d6a51ffd..2810e205 100644
--- a/src/components/attachment/attachment.vue
+++ b/src/components/attachment/attachment.vue
@@ -8,7 +8,7 @@
-
+
diff --git a/src/components/still-image/still-image.js b/src/components/still-image/still-image.js
new file mode 100644
index 00000000..fa027bc4
--- /dev/null
+++ b/src/components/still-image/still-image.js
@@ -0,0 +1,29 @@
+import fileTypeService from '../../services/file_type/file_type.service.js'
+
+const StillImage = {
+ props: [
+ 'src',
+ 'referrerpolicy',
+ 'mimetype'
+ ],
+ data () {
+ return {
+ hideNsfwLocal: this.$store.state.config.hideNsfw,
+ }
+ },
+ computed: {
+ animated () {
+ return this.mimetype === 'image/gif'
+ }
+ },
+ methods: {
+ drawCanvas() {
+ const canvas = this.$refs.canvas
+ if (!canvas) return
+ const ctx = canvas.getContext('2d')
+ ctx.drawImage(this.$refs.src, 1, 1, canvas.width, canvas.height)
+ }
+ }
+}
+
+export default StillImage
diff --git a/src/components/still-image/still-image.vue b/src/components/still-image/still-image.vue
new file mode 100644
index 00000000..fa086e51
--- /dev/null
+++ b/src/components/still-image/still-image.vue
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+