- Issue created by @almador
- π¬πͺGeorgia almador
It looks like providing:
[node:field_media_image:entity:field_media_image]
at 'Advanced -> Image' and 'Open Graph -> Image' did the trick! - πΊπΈUnited States DamienMcKenna NH, USA
Thanks for working through it and finding the right solution.
I'm going to turn this into a documentation task to update the module's docs with suggestions on which tokens to use.
- π¬πͺGeorgia almador
Thanks, Damien!
I've read somewhere that I need to enable 'Custom display settings' for 'Token' view mode at:
admin/structure/types/manage/content_type/display
Is it necessary?
- πΊπΈUnited States DamienMcKenna NH, USA
You only need to enable that view mode if you specifically need to customize the output of one of the tokens, so it isn't strictly necessary.
- π³π΄Norway vegardjo
Chiming in as this was the first result on Google.
When I do the equivalent of
[node:field_mediaref_on_node:entity:field_media_image]
I get several og:image meta tags, one for the URL, another for the title, another for the caption etc.If I do
[node:field_mediaref_on_node:entity:field_media_image:url]
I get no og:image tag.Via this documenttation https://www.drupal.org/docs/contributed-modules/metatag/frequently-asked... β I found that you should include the image style machine name, like so:
[node:field_mediaref_on_node:entity:field_media_image:wide:url]
..here "wide" is the image style, and this gives me correct content in the og:image tag.
- π©π°Denmark Steven Snedker
You are absolutely right, @vegardjo. I've posted a better description for the og:image field as a feature request at More helpful description for the og:image field β¨ More helpful description for the og:image field Active .