Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Facebook detect images when adding a link?

When you add a link to your Facebook page, after some processing, Facebook presents you a next/prev button to choose an image linked to the url your are inserting.

Obviously, Facebook reads the html-page and displays the images found on the url you insert.

Does anyone knows what algorithm Facebook uses to decide what images to show ?

If I insert a link to : http://www.staplijst.be/lachende-wandelaars-aalter-aktivia-003.asp, only 11 images are detected. The one I want, the one at the top right corner, is not included in the list.

If I insert a link to http://www.staplijst.be/stichting-kennedymars-rijsbergen-zundert-nederland-knblo-nl-81996.asp, 19 images are displayed (including the one I want (the one at the right top corner of the text area).

Both pages are build using asp code but are functionally the same.

I thought that it has something to do with the image size, but can't find any deciding factor there.

I will investigate some furhter, because if I know what Facebook is looking for, I can make sure that the correct images are included on the page (since they are dynamic pages build with classic asp).

But if anyone has any idea ? Help would be appreciated.

like image 585
Edelcom Avatar asked Feb 19 '26 15:02

Edelcom


1 Answers

This looks like a duplicate of: Facebook Post Link Image

Use <link rel="image_src" href="abs_url_of_your_image">
like image 140
Thomas Kjørnes Avatar answered Feb 21 '26 08:02

Thomas Kjørnes



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!