diff --git a/client/components/covers/AuthorImage.vue b/client/components/covers/AuthorImage.vue index b4fb3cca..af8a394f 100644 --- a/client/components/covers/AuthorImage.vue +++ b/client/components/covers/AuthorImage.vue @@ -65,15 +65,10 @@ export default { }, methods: { imageLoaded() { - var aspectRatio = 1.25 - if (this.$refs.wrapper) { - aspectRatio = this.$refs.wrapper.clientHeight / this.$refs.wrapper.clientWidth - } if (this.$refs.img) { var { naturalWidth, naturalHeight } = this.$refs.img var imgAr = naturalHeight / naturalWidth - var arDiff = Math.abs(imgAr - aspectRatio) - if (arDiff > 0.15) { + if (imgAr < 0.5 || imgAr > 2) { this.showCoverBg = true } else { this.showCoverBg = false