[www] Meta Image size added

This commit is contained in:
Roman Timashev committed 2017-09-18 14:33:54 +03:00
1 parent 2bdceaecb8
commit 16a8719927
2 files changed
+6

No files matched your search

+4
View File
@@ -104,8 +104,12 @@ function getMeta(article) {
try {
const artifact = article.preview.findArtifact(types)
meta.image = artifact.url
meta.imageWidth = artifact.width
meta.imageHeight = artifact.height
} catch (error) {
meta.image = 'https://art.shlisselburg.org/entrance.jpg'
meta.imageWidth = 1200
meta.imageHeight = 630
}
}
return meta