add og:image in Wordpress Gutenberg - wordpress

So I create a new post in Wordpress.
I use the Gutenberg image block to upload an image.
When I scrape the post at the Facebook sharing debugger it displays another random image from my library and tells me no og:image is set.
There's only one image -- how to add the og:image tag?

The og:image tag will contain only the "featured image" of your WP post. If there is no featured image, social media sites will probably use/display the first "regular" image appearing in your post, but there's no guarantee for that.
You might want to use the "Yoast" plugin, this will most likely try to achieve this automatically.

Related

Custom snippet to set a featured videos instead of images for a post

I'm looking for an option to show a Video instead of a Featured image of a specific post. (Want to create a category overview with video thumbnails). Earlier it was possible with Post Format --> Video with the classic editor with the direct input of the URL in the textfield. But we have several team members who don't want to work with this editor anymore. Is there a snippet to set videos as a featured images in posts to create a video overview instead of a image? I guess a pug-in is a little bit an overkill to use.
Thanks!

Meta tag og:image showing other image than featured image

I am working on a news page with wordpress, and currently I am having an issue with the meta tag og:image.
This tag on the source code, always shows the correct featured image on the url. But when I ty to share it on facebook, sometimes it is showing a different image on the content, Not the featured image. I've tried everything but I can't understand what is causing the issue. I am using sage theme on wordpress so I don't know if it could be blade cache.

Adding a link from an image in wordpress

This seems to be more difficult than it should be.
All I would like to be able to do is add a link from an image on my wordpress site to an external website.
Using the normal media library tools this doesn't seem to be possible so I got the plugin WP Gallery Custom Links
However, even though I added the external link to the Gallery Link URL it still doesn't link.
Is there a more straightforward way to embed a link into an image?
Here is a screenshot of the image editing page:
If you are trying to make an Image clickable and bring you to an external site, click the image, click Edit, under Display settings select link to, custom url, and there you go.
Another way is, when you are adding an image to your site from your Media Library within Wordpress, there is an option "Link to" under Attachment Display Settings.

Post or Page specific image gallery in Wordpress

Is there a way from which I can use any plugin and show Post or Page specific image gallery? The image gallery upload area should be displayed in Page when Creating or Editing the page below or above the text composer or should be at least in the page. And this gallery should not be hocked the default Image gallery of wordpress or at least should not show the images that's in default gallery.
Kindly let me know if anybody knows any plugin that does the above mentioned job.
You can do this simply by [gallery] shortcode. You can also set image ids like this: [gallery ids="729,732,731,720"]
Here is my answer: All my requirement got fulfilled by default "Media Library" tab. I just need to select the option "Uploaded to this page" from the dropdown. So, no need to use any plugin for the requirement I had.

Featured imaged not showing wordpress

In my wordpress blog, I would like to select a featured image so that when url is shared on social network like facebook it has an image. but I do not want that image to show up on the page or the post of website.
You should modify the template responsible for post visualisation and add the OpenGraph meta tag.
Here's the documentation:
https://developers.facebook.com/docs/sharing/webmasters#markup
The tag you need is "og:image":
<meta property="og:image" content="<your image path>" />
It is not a big problem. There are lot of plugins from wordpress by which you can set featured image for any posts.
Here is the link to the plugin
Featured image plugin
you have to modify the single.php file and page.php file.
You can remove the code segment that show featured image from the above two files.
also there are some plugin may do this functionality,
you can check this, But I haven't check this one.
https://wordpress.org/plugins/hide-featured-image/

Resources