Web Analytics Made Easy -
StatCounter How does one get social media post images to appear according to the post itself? - CodingForum

Announcement

Collapse
No announcement yet.

How does one get social media post images to appear according to the post itself?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How does one get social media post images to appear according to the post itself?

    Is there a way of getting an image relevant to a blog post to appear instead of the image as given in the meta tag for the site?

    I am having difficulties getting an image to appear, other than the one coded in a meta tag, that is relevant to a particular blog post. The blog software is a third party module called Stiva Blog by http://phpjabbers.com. (To put in a support ticket to these guys would cost $$$ so here I am asking this question!). In the blog admin area there is an SEO section where the only things one can add are:

    Meta title
    Meta keywords
    Meta description

    There is no provision for an image meta tag (which would be the one that is needed for individual blog posts):
    Code:
    <meta
            property="og:image:type"
            content="image/jpeg"
    >​
    which would probably be shown (if it was included) as:
    Meta post image

    So within the current constraints is there any way to grab an image that is at the top of a post and be able to use that for social media post images by over-riding the meta tag for the entire site dealing with images? The site-wide meta tags I am talking about are these:
    Code:
    <!-- Twitter-->
    <meta
          property="og:image"
          content="http://62.171.149.227/images/TFN-1200x628.jpg"
    >​
    <!-- #Twitter -->
    <meta
            property="og:image"
            content="http://62.171.149.227/images/TFN-1200x628.jpg"
    >
    <meta
            property="og:image:type"
            content="image/jpeg"
    >
    <meta
            property="og:image:width"
            content="1200"
    >
    <meta
            property="og:image:height"
            content="628"
    >​
    The site where I am trying to get this problem resolved is http://theforensicnurse.org (that resolves to its IP address).
    Last edited by judgedredd; Sep 12, 2022, 11:01 PM.

  • #2
    Social media websites only draw the images from these meta elements, there is no way to automatically have a different content image displayed. If there is no way to modify the code (e. g. to add a custom field for an alternative image and then change the template to show that image if it is uploaded, otherwise the default image) then you’re out of luck.
    Stop solving problems you don’t yet have!

    Comment


    • #3
      Hi VIPStephan, thanks for the input. The reason for the post in the first place is because there are sites where, without the social media meta tags, a post which gets posted in social media grabs the top image in the post and uses that as a post image instead of a site's favicon. So I have been trying to understand why that happens sometimes and not other times.

      Comment

      Working...
      X