I start to publish on facebook and I realise that customs fields are not taken into account. This has the effect of not having a thumbnail image or video....
Too bad for posts on social networks! Is there anything to do? or if it can be added in a future version?
ACF/tassos fields taken with custom fields: video, soundcloud, OSM fields
ochOpenGraph has out-of-the-box support for CustomFields.
In the plugin's configuration you can set the following Custom Fields that when used in an article will be set as metatags:
these can be the same or different for both OG and Twitter cards.
Using Custom Fields allows you to spefically add an Image to an article that will be used when shared on Social Media.
So for me there is on problem as this works flawlessly
if you mean that ochOpenGraph doesn't autodetect Custom field (images) like it does intro / full / text images: you are right. That is not the way it is designed to work with Custom Fields. Not designed because setting a Custom Field like we can do now ticks all the boxes.
edit: the page you shared only has a 300px image (pecona?) set that is probably 'injected' into the text and not part of the article text itself, you have not configured ochOpenGraph to use a fallback image, that is why currently that page doesn't have a og:image tag at all. The image on the page has to low reolution to be any good on Social Media, so my advise would be:
1. add a custom field to the articles and fill that with an image
2. configure a generic fallback image so that you always display a good / high quality image on Social Media when no other inmage is found on page.
Maybe you can share more specifically what you are trying to do and how you think ochOpenGraph should handle it.
the challenge here is that ochOpenGraph needs to find any Custom Field on the page AND have the logic to see if this is a field that can be used by Social Media platforms.
Now for the intro image and full text image (and the Custom Field image set for this purpose) is is okay as these fields are specially designed to hold images, but every other custom field is potentially not: there is no logic as to what that field holds (image, sound, vido, etc.) nor what custom field is displayed in what order on the page.
So if I was able to implement this, this is what basically would happen (depending on your PRIO setting in ochOpenGraph:
check for Intro image
check for Full image
check for Text image (first image in the article text)
check for Custom image
check for Custom Field image
if none found, use the Fallback image
if no fallback image found use no image: by doing this The social Media platform will visit the shared page and will look for the best suitable image on the page.
So the default behavior that the Social Media platforms already have, is what you would want me to build in: in steps 1 to 6 doesn't give an image, then take an image from the page (set by whatever custom field).
So not sure what this will add other then what is currently done by the Social Media platforms already.
I don't understand why you are talking about the pictures!!
There is no image, it's more like a thumbnail of another type of video, souncloud, osm ...
Well not the impression that it is possible or that you are interested
then I probably do not understand what you want. if there is no image on the page, then ochOpenGraph will takle the configured (if any) fallback image.
If you don't configure a fallback image in ochOpenGraph, then no image will be shared.
In the example with www.alterweb.info/fr/videos/si-c-est-gra...vous-etes-le-produit
This is the thumbnail image of the youtube screen which is a custom fields
Currently facebook doesn't get anything if I post this url.
It's the same with other custom fields that have a rendering: other video providers, sounclound, OSM field ...
For the moment I haven't found any extension that retrieves the thumbnails of these custom fields. Maybe it's too difficult to do so because of the interest !!?
Hi Hervé, okay I now understand.
but when there is no image on the page then facebook will not see the image.
so there are two options:
1. add a fallback image in ochOpenGraph. That way you always share with an image (not a thumbnail for youtube / soundcloud etc. but a generic configured image)
2. add the image yourself to the page (you can even hide it or set the with to 1px if you do not want to show it).
it is not because of lack of interest, but because what you ask is not possible: ochOpenGraph would then need to 'understand' what custom field you are using, follow that content (e.g. a soundcloud link, but could also be a vimeo, youtube, whatever link). figure out how that remote platform creates (if any) thumbnail (youtube has a special URL for fetching the thumbnails) and then add that thumbnail to the og:image tag if that tag is not filled with another image....
ochOpenGraph 'sees' the same that facebook sees, a url to an external (content) source, not an image.
This should IMO be solved by the creator of these custom fields: they know what the fields are used for and can add logic to e.g. not show the video (on pause) as now on your current page, but instead show an image with the thumbnail that you need to click...