PHPackages                             studiothick/silverstripe-opengraph - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. studiothick/silverstripe-opengraph

ActiveSilverstripe-module[Utility &amp; Helpers](/categories/utility)

studiothick/silverstripe-opengraph
==================================

Automatically generates Open Graph data for a Silverstripe page.

02.4k1PHP

Since Dec 20Pushed 9y ago2 watchersCompare

[ Source](https://github.com/StudioThick/silverstripe-opengraph)[ Packagist](https://packagist.org/packages/studiothick/silverstripe-opengraph)[ RSS](/packages/studiothick-silverstripe-opengraph/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

SilverStripe OpenGraph extension
================================

[](#silverstripe-opengraph-extension)

This module is a work in progress. Bug reports or feature requests welcome.

This module adds a `getOpenGraph` method to the Page class to be used in templates. Calling `$OpenGraph` in a template will return a series of automatically generated tags corresponding to the standard open graph attributes.

- `og:title`: from `$Title`
- `og:type`: hardcoded to `"website"`
- `og:image`: absolute URL. tries `$HeroImage`, `$PostImage`, `$Image`, then `$FeaturedImage`
- `og:image:width`: width, as `og:image`
- `og:image:height`: height, as `og:image`
- `og:url`: absolute URL of page (`Director::protocolAndHost() . $this->Link`)
- `og:description`: from `$MetaDescription`
- `og:locale`: from `i18n::get_locale()`
- `og:site_name`: from `$SiteConfig.Title`
- `og:determiner`: unused
- `og:locale:alternate`: unused
- `og:audio`: unused
- `og:video`: unused

All of the above can be overridden in `Page.php` or a given subclass according to the naming convention `getOpenGraph_attribute`, with `og` removed and `:`s replaced with spaces. For example, `getOpenGraph_image_width()`.

To override the image selection behaviour (for example, to return a static image, or to return a field that is not in the list that the extension searches for), simply implement `getOpenGraphImage()` to return a SilverStripe Image object.

Installation
------------

[](#installation)

Install via `composer require studiothick/silverstripe-opengraph`.

Usage
-----

[](#usage)

Example:

```

    $SiteConfig.Title | $Title

    $OpenGraph

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/97208b9d7e1ad05cb71e43fa3e088a283af748d4950ebd51d69636b01cf28f87?d=identicon)[StudioThick](/maintainers/StudioThick)

---

Top Contributors

[![mcccclean](https://avatars.githubusercontent.com/u/2935841?v=4)](https://github.com/mcccclean "mcccclean (6 commits)")[![gvnn](https://avatars.githubusercontent.com/u/687228?v=4)](https://github.com/gvnn "gvnn (4 commits)")

### Embed Badge

![Health badge](/badges/studiothick-silverstripe-opengraph/health.svg)

```
[![Health](https://phpackages.com/badges/studiothick-silverstripe-opengraph/health.svg)](https://phpackages.com/packages/studiothick-silverstripe-opengraph)
```

###  Alternatives

[joshfraser/php-name-parser

PHP library to split names into their respective components (first, last, etc)

1891.2M2](/packages/joshfraser-php-name-parser)[zamoose/themehookalliance

Theme Hook Alliance

37010.4k](/packages/zamoose-themehookalliance)[the42coders/workflows

This Package allows you to automate your Laravel Application from your Backend.

2652.3k](/packages/the42coders-workflows)[pigochu/yii2-jquery-locationpicker

jquery location picker widget for yii2

2040.5k2](/packages/pigochu-yii2-jquery-locationpicker)[gosquared/php-sdk

1023.3k](/packages/gosquared-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
