PHPackages                             netwerkstatt/silverstripe-opengraph-extension - 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. netwerkstatt/silverstripe-opengraph-extension

ActiveSilverstripe-vendor-module

netwerkstatt/silverstripe-opengraph-extension
=============================================

Extends tractorcow/silverstripe-opengraph with better image handling (FocusPoint), Twitter cards, and Schema.org support.

0.2(1mo ago)02BSD-3-ClausePHPPHP ^8.1

Since Mar 10Pushed 1mo agoCompare

[ Source](https://github.com/wernerkrauss/silverstripe-opengraph-extension)[ Packagist](https://packagist.org/packages/netwerkstatt/silverstripe-opengraph-extension)[ RSS](/packages/netwerkstatt-silverstripe-opengraph-extension/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

Silverstripe OpenGraph Extension
================================

[](#silverstripe-opengraph-extension)

Extends [tractorcow/silverstripe-opengraph](https://github.com/tractorcow/silverstripe-opengraph) with advanced image handling, CMS previews, Elemental support, and Schema.org integration.

Features
--------

[](#features)

- **Advanced Image Handling**: Automatically resizes images to 1200x630px using `FocusFill()` (if `jonom/silverstripe-focuspoint` is installed) or `Fill()`.
- **Watermark Support**: Automatically applies watermarks if configured in `SiteConfig`.
- **CMS Preview**: Adds a real-time Social Media preview in the "OpenGraph" tab of the CMS, including warnings for missing content.
- **Elemental Support**: Automatically generates `og:description` from Elemental blocks if the main content field is empty.
- **Twitter Cards**: Automatically generates `twitter:card` (summary\_large\_image).
- **OG Dimensions**: Includes `og:image:width` and `og:image:height` for faster preview generation on first share.
- **Schema.org (JSON-LD)**: Provides a framework for JSON-LD, with optional `spatie/schema-org` support.

Extensions
----------

[](#extensions)

### OpenGraphImageExtension

[](#opengraphimageextension)

Adds a `OGImageCustom` field to pages for specific Open Graph images. It also provides the `getOGImage()` hook for the builder and the CMS preview.

- **Target**: `Page`

### ElementalOpenGraphExtension

[](#elementalopengraphextension)

Provides an optimized `getOGDescription()` for pages using Silverstripe Elemental. It uses `getElementsForSearch()` to aggregate content from blocks.

- **Target**: Classes with `ElementalPageExtension`

### OpenGraphBuilderExtension

[](#opengraphbuilderextension)

Extends the `OpenGraphBuilder` to include Twitter card types and image dimensions.

- **Target**: `TractorCow\OpenGraph\ObjectBuilders\OpenGraphBuilder`

### SchemaExtension

[](#schemaextension)

Injects JSON-LD into the page head.

- **Target**: `Page` and `ContentController`

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

[](#installation)

With composer:

```
composer require netwerkstatt/silverstripe-opengraph-extension
```

Configuration
-------------

[](#configuration)

The module is pre-configured to apply to all `Page` objects. You can customise the image dimensions in YAML:

```
Netwerkstatt\OpenGraph\Extension\OpenGraphImageExtension:
  og_image_width: 1200
  og_image_height: 630
```

### Elemental Integration

[](#elemental-integration)

If you want to explicitly enable Elemental support for a specific page type:

```
Netwerkstatt\Site\Page\BlockPage:
  extensions:
    - Netwerkstatt\OpenGraph\Extension\ElementalOpenGraphExtension
```

Schema.org Customization
------------------------

[](#schemaorg-customization)

You can extend the JSON-LD data in your `Page` class or via an extension:

```
public function updateSchemaData(&$schema)
{
    // If spatie/schema-org is used, $schema is a Spatie object
    if ($schema instanceof \Spatie\SchemaOrg\WebPage) {
         $schema->author('My Name');
    }
}
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance89

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Every ~5 days

Total

2

Last Release

57d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ff3ee546a6d1b1092f1badf68523ba30f28dec7fce11254a8cb3aeb57c6202de?d=identicon)[wernerkrauss](/maintainers/wernerkrauss)

---

Top Contributors

[![wernerkrauss](https://avatars.githubusercontent.com/u/1043925?v=4)](https://github.com/wernerkrauss "wernerkrauss (7 commits)")

### Embed Badge

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

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

###  Alternatives

[silverstripe/cms

The SilverStripe Content Management System

5163.4M1.3k](/packages/silverstripe-cms)[silverstripe/graphql

GraphQL server for SilverStripe models and other data

512.4M21](/packages/silverstripe-graphql)[silverstripe/admin

SilverStripe admin interface

262.6M325](/packages/silverstripe-admin)[silverstripe/silverstripe-omnipay

SilverStripe Omnipay Payment Module

38106.0k15](/packages/silverstripe-silverstripe-omnipay)[silverleague/ideannotator

Generate PHP DocBlock annotations for DataObject and DataExtension databasefields and relation methods

4768.0k43](/packages/silverleague-ideannotator)[jonom/silverstripe-share-care

Social media sharing previews and customisation for Silverstripe

2932.7k1](/packages/jonom-silverstripe-share-care)

PHPackages © 2026

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