diff --git a/lib/v2/gq/templates/img.art b/lib/v2/gq/templates/img.art index 3019ef276..4baa2d696 100644 --- a/lib/v2/gq/templates/img.art +++ b/lib/v2/gq/templates/img.art @@ -1,4 +1,6 @@ +{{ if src }}
{{ if alt }}
{{@ alt }}
{{ /if }}
+{{ /if }} diff --git a/lib/v2/gq/tw/index.js b/lib/v2/gq/tw/index.js index 252debac7..26bbb0f52 100644 --- a/lib/v2/gq/tw/index.js +++ b/lib/v2/gq/tw/index.js @@ -136,8 +136,8 @@ module.exports = async (ctx) => { dangerousDek: transformed.article.headerProps.dangerousDek, // quote lede: art(path.join(__dirname, '../templates/img.art'), { // header image - src: largestImage(lede.sources, lede.id), - alt: lede.caption, + src: lede?.sources ? largestImage(lede.sources, lede.id) : null, + alt: lede?.caption, }), articleBody: articleBody.html(), });