[fix] use thumb in head og:img only

This commit is contained in:
les
2019-11-14 16:39:23 +01:00
parent da2c1997f7
commit 3498371fd0

View File

@@ -145,7 +145,7 @@ export default {
{ property: 'og:type', content: 'event' }, { property: 'og:type', content: 'event' },
{ {
property: 'og:image', property: 'og:image',
content: `${this.settings.baseurl}${this.imgPath}` content: this.thumbImgPath
}, },
{ property: 'og:site_name', content: this.settings.title }, { property: 'og:site_name', content: this.settings.title },
{ {
@@ -161,7 +161,7 @@ export default {
{ property: 'twitter:title', content: this.event.title }, { property: 'twitter:title', content: this.event.title },
{ {
property: 'twitter:image', property: 'twitter:image',
content: `${this.settings.baseurl}${this.imgPath}` content: this.thumbImgPath
}, },
{ {
property: 'twitter:description', property: 'twitter:description',
@@ -169,7 +169,7 @@ export default {
} }
], ],
link: [ link: [
{ rel: 'image_src', href: `${this.settings.baseurl}${this.imgPath}` }, { rel: 'image_src', href: this.thumbImgPath },
{ {
rel: 'alternate', rel: 'alternate',
type: 'application/rss+xml', type: 'application/rss+xml',
@@ -242,11 +242,14 @@ export default {
} }
return event.id return event.id
}, },
imgPath() { imgPath () {
return '/media/' + this.event.image_path
},
thumbImgPath() {
if (this.event.image_path) { if (this.event.image_path) {
return '/media/thumb/' + this.event.image_path return this.settings.baseurl + '/media/thumb/' + this.event.image_path
} else { } else {
return '/logo.png' return this.settings.baseurl + '/logo.png'
} }
}, },
is_mine() { is_mine() {