This question already has an answer here:

My facebook is grabbing the wrong image.

I try to adding this open graph image in my head.

<meta property="og:image" content="<?= $_GET['image'] ?>" />


<meta property="og:image" content="<?php echo $image; ?>"/>

but the content image path is not shown. It became this

<meta property="og:image" content="" />

I want it to be like this. If the article A have image a_name.jpg, the meta will be <meta property="og:image" content="/images/a_name.jpg"/>

If the article B have image b_name.jpg, the meta will be <meta property="og:image" content="/images/b_name.jpg"/>

marked as duplicate by Mołot, Krishna Mohan, Shawn Conn, Scott Joudry, Geoff Jul 3 '15 at 0:53

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


You need to supply the tag the full URL to the image. If you install the Metatag module not only can you have full control over keyword, description, etc. but also all the og tags too per node.

  • I want the Metatag open graph image has a unique image path in every pages. Insert a URL will define showing the same image all articles. – user73963 Jun 18 '15 at 12:11
  • Yes that's exactly what I'm saying, and the Metatag module does it for you – Colin Shipton Jun 18 '15 at 13:55
  • What is the code should I put? – user73963 Jun 18 '15 at 13:58
  • No code, install the module and when editing the node in the vertical tabs at the bottom one is called Meta tags and you can override the default settings – Colin Shipton Jun 18 '15 at 14:05
  • I get you. It needs to add in every node. – user73963 Jun 19 '15 at 2:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.