Set Image Custom Field as Open Graph Image in Metatags I have installed the Metatags module along with the Open Graph and Twitter Card extension modules. In my default content type, I have added an Image field that allows an image to be uploaded for use on Facebook and Twitter.

Now I cannot get the Metatags module to accept this image custom field as the entry for the og:image and Twitter Card Image fields. I've tried entering [node:field_image] but the meta tags do not get added to the source code. If I enter a URL the tags appear.

How do I get Metatags to dynamically include a corresponding image for each page in the Open Graph and Twitter Cards metadata?
I used drupal_add_html_head in my case. In my theme template.php.

$og_image = image_style_url('200x200', $node-&gt;field_gallery_preview_image[LANGUAGE_NONE][0]['uri']);
// OG image meta property.
drupal_add_html_head(array(
  '#tag' =&gt; 'meta',
  '#attributes' =&gt; array(
    'property' =&gt; 'og:image',
    'content' =&gt; $og_image,
  ),
), 'node_' . $node-&gt;nid . '_og_image');