You can start with changing the image URL itself. Unfortunately, this isn’t controlled by the Yoast SEO plugin but by WordPress. You may refer here: https://wordpress.stackexchange.com/questions/151485/how-to-change-image-url
Thread Starter
Ashish
(@ashishpatel1992)
Hi,
I think you didnt get my question correctly.
Lets assume a situation where I have a post and Yoast automatically takes featured image or any other image from the page and put it as og:image.
Now if I want to fix a specifc image to be displayed at og:image I need to goto the post , scroll to yoast and facebook sharing option where I can upload my image, to override all other images.
What I am exactly looking for is for example I have a custom field name
my_custom_image.
Now I want yoast to always take the image from my_custom_image field. So I dont need to upload image manually for every post.
You can use the wpseo_opengraph_image filter to programmatically add the og:image URL from the custom field.