I posted a few days ago how it was possible to tell FB to fetch specific images in my site for status updates.

I still need to tell it what not to fetch, since many of these pictures wouldn't represent the website very well. I'd really rather only show the site logo.

  • 2
    Great question! I often see when a site is shared that Facebook picks a banner ad as its image even though they come from a completely different domain! I'd imagine this would be very common and easy for them to avoid but the next best thing would be to find the answer to your question :)
    – Itai
    Mar 3, 2013 at 21:26
  • If you use the og:url tag, you can specify which image is default, but the others will still show up as choices. I'm not sure of a way to exclude images, unless you make them background images.
    – Dallas
    Mar 27, 2013 at 4:59
  • Have you considered robots.txt?
    – MrWhite
    Aug 8, 2016 at 11:24
  • I think this will answer your question well stackoverflow.com/questions/1138460/…
    – George G
    Aug 8, 2016 at 13:20

5 Answers 5


If I understand you correctly, you want Facebook NOT show images they have scraped from your site (because they might be out of context) and want to know how to instruct them or simply stop them from doing it.

You can also just create a dynamic rule that will redirect any attempt to pull certain files back to a single file, sort of a "Neener Neener" kind of result to the requester. Either way, this generator might be useful. Especially if you always want them to get the same image like your logo no matter what "they" grab automatically.

  • FWIW, the "generator" linked above cannot be used to generate such a redirect. (That generator is only for specific rewrites.)
    – MrWhite
    Aug 9, 2016 at 15:46

One solution would be to cloak your page when the facebook scraper comes along. It uses the user agent.

facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)

For that user agent, serve a version of the page with the images removed.


There are apparently two ways of doing this and the best thing to do is to check out the SO question, but for quick reference, one or more <link rel="image_src" href="..."/> tags will keep FB in check (for now).

  • "two ways of doing this" - and what "two ways" are those? Please include the relevant (summarised) information in your answer, rather than just linking to another post/site. (The linked question has 12 answers - which answer are you referring to?)
    – MrWhite
    Aug 8, 2016 at 10:59

I had the same problem when Facebook grabbed avatars from my page, and I discovered that Facebook grabbed images that are largest. So if you want to show up only one image, for instance, make it bigger (I think 10px will be enough since it's a code that probably compare numbers, but this need to be tested).

  • "I think 10px will be enough" - but 10px is very small?! Or are you suggesting to make all the other images very small so that FB won't use them? (Although that is probably impractical.)
    – MrWhite
    Aug 8, 2016 at 10:52

Try this- <meta property="og:image" content="http://yoursite/yourImage.jpg"> It is Open graph protocol. http://ogp.me/ You decide which image Facebook will show.

  • You should explain why this is a useful answer
    – John Conde
    Aug 8, 2016 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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