2

I am using the tx_news extension, included with an opengraph image. This image is implemented with 500 x 258 pixel.

Where or how can I edit this values?

Facebook recommended 1200 x 630 pixel or a minimum of 600 x 315 pixel.

Mario Wilhelm
  • 308
  • 2
  • 14

1 Answers1

3

This is set in the Details/Opengraph partial.

<n:metaTag
        property="og:image"
        content="{f:uri.image(src:'{newsItem.firstPreview.uid}', treatIdAsReference:1, maxWidth:'500')}"
        forceAbsoluteUrl="1" />

You can copy the default file from EXT:news/Resources/Private/Partials/Details/Opengraph.html to your website extension (or wherever you have you website files) and change it there. If you're using the default extension TypoScript, you can then set the TypoScript constant plugin.tx_news.view.partialRootPath to this location. For example, if you copy the file to EXT:website_mysite/Resources/Private/Partials/Extensions/news/Details/Opengraph.html, you need to set the constant to EXT:website_mysite/Resources/Private/Partials/Extensions/news/.

Rudy Gnodde
  • 4,286
  • 2
  • 12
  • 34
  • Thanks. I already found this element too. I changed it, but nothing happend. Today I tried again and it worked. Strange. – Mario Wilhelm Jan 22 '20 at 11:09
  • 1
    I changed it in the news extension itself as well, see https://github.com/georgringer/news/commit/5ce3fbd737af67bb5f98a32ccbffa511ac98d3cc Thanks for the reminder! – Georg Ringer Jan 22 '20 at 19:18