OGP featured images

Glad to see this is added as a feature in 5.3
I cannot get it to work though. I have put {{ogp:image}} at the end of the blog post along with {{social}} and the image is still the default one as set i settings.
If I take that filepath out of settings then no image shows at all, and also

<meta property="og:image" content= does not apear in the page code. Am I doing something wrong?

The ogp tag doesn’t work for me either.
but what works if you use a featured-image, this will automatically included in the ogp source code.

But you have to enter a default image in the settings.

Michael knows, I wrote something here: https://github.com/yuzoolcode/pulsecms-tracking/issues/96

1 Like

Oh yes, if I put a main featured image in settings that shows up on the page and in social shares. The whole point is though that I have had clients request that the image used in that particular blog post is the image that gets used, and thats what Michael said was going to happen.

Yes - it takes the featured image of the blog post but doesn’t automatically scan the blog post.

The featured images are now used in the OGP tag. That can be changed by embedding an {{ogp:image}} in the blog item content.

So add featured images for posts where you want this to go in the social shares.

And as @Oliver mentioned, you’ll have to set a default in the settings for this to work at the moment.

1 Like

Can you explain how we embed the tag in the blog content?
In the meta drawer or on the page content or what? Sorry, not getting it.

In settings main page I have this in the OGP default dialogue image box: content/media/pumpkin.jpg

And in the blog post I have put {{ogp:image}} at the end of the text content.And there is a new image inthe post.
But if I share it, the pumpkin picture is the one that is used.
But if

The tag for manually overwriting the ogp image would look like this:

{{ogp:image:content/media/gallery1/city.jpg}}

It just has to be placed somewhere in the blogpost. I would just put it at the end.

But... at least for me it doesn't work at the moment, I think the tag has to be reworked. (I already reported it to Github.)

1 Like

Ah I see. We have to manually put in the image path and name. I was hoping that the generic tag would take the iamge used in the post. Okay - its still a step inthe right direction. However, as you say - it does not work.
On my post I have put:

{{ogp:content/media/featured_images/1.jpg}}
and yet on the rendered page I stil get the default pumpkin.

Try this: {{ogp:image:content/media/featured_images/1.jpg}}

1 Like

yes of course, left a bit out…thanks.
But it still does not work.
Still got a pumpkin!

https://github.com/yuzoolcode/pulsecms5/issues/719

This has been fixed.

The OGP is now using /media/branding/pulse5_banner.jpg as the default. And you can override it with the that tag.

The next version will have this in it (5.3.1) and will also include some other OGP improvements to be mentioned soon… so this might be different shortly :wink:
More on this soon

1 Like

The OGP featured images element has been improved. This will be out in 5.3.1 very soon.

As with {{recentposts_visual}} tag changes, this now has some sort of scanning of images also (via folders).

Also some more info:

  • The old OGP plugin is still there but it’s now not used (deprecated). And will be removed from the manual.
  • The new social_exposure feature has the output replacing the OGP placeholder in the layout file.
  • There’s no need to add the social_exposure tag.
  • The images used come from the media/opengraph directory with the pages coming from media/opengraph/page/
    That also opens some space for future changes.
  • media/opengraph/page/ needs the page images. For each page an image is loaded from here (or a default /media/branding/pulse5_banner.jpg is used as set in settings)
  • There are more options in settings for social media keys and accounts if needed
  • The old OGP isn’t used anymore. I don’t know if anyone might be using it in a custom layout though.
  • This is not a tag and will auto add this as per the <!-- OGP PLACEHOLDER --> in your theme.
  • It’s possible to use this in the layout if someone replaced the OGP placeholder with the tag though.

Thanks for the feedback on this and hope this makes your live’s easier adding OGP data for sharing your sites + posts on social media!

Sounds great! Looking forward to it. Thanks Michael and Pulse team.

1 Like

Unfortunately the OGP tag doesn’t work for me anymore at the moment (Pulse 5.3.1).

Neither with a featured image nor with an image in the folder media/opengraph.
Only the standard image is displayed in the OGP tag.

Is there anything special to note?

Well right away I can see there is another filepath problem:
meta property=“og:image” content="https://www.laluz.me/media/branding/pulse5_banner.jpg

it should be looking in /content/media/branding

edit: just tried changing this in settings, as well as adding a new media folder for images, and it has no effect at all.
If I remove the default image in settings it still shows up as the same on page source on the post.

But I still dont understand how we are supposed to add an image for OGP on a per post basis.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

Plugged in a fix for this for 5.3.2 :slight_smile:

  • use featured images for blog items (if they exist)
  • body tag - factor out the url and blog page processing for reuse
  • open graph image loading fix (per page)
1 Like