Social media sharing images for SilverStripe

Adding social metatags, such as the Twitter card and the Facebook open graph protocol can be added to SilverStripe using the xini/silverstripe-social-metadata module. This module includes all you need to define social sharing and SEO-friendly metatags for your SilverStripe website. You can upload social sharing images for any page you want.

Generating sharing images on demand

There are a number of social-sharing image generators/tools out there. These tools allow you automatically or manually generate the image you need. If you having a website with regular new content to share this can become a burden. Most tools are paid. An alternative is a free service all Imageee. Imageee was created by Thomas Petracco as a side-project. Feel free to read about his story behind the service.

Combining it with the SilverStripe blog

Combing the two is no masterpiece of work. It's just a download of the Imageee-generated image on the webserver, storing it in the assets and linking it the page. This way, the file can be managed in the SilverStripe CMS Admin. The automatically generated file will automatically update, if the title or featured image changed. If you ever need to force this update, you can always just delete the social sharing image from the assets admin and triggering a new generation by saving the related page.

The result is packed into the SilverStripe social sharing images package, available on GitHub.

What is required and how to get it?

The direct requirements are pretty much the known basics or above mentioned modules:

Installation is usual as composer dependency:

composer require bringyourownideas/silverstripe-social-sharing-images

The installation adds all required configuration for now. In later versions there might be more options coming.

Thanks

Special thanks for Florian Thoma and Thomas Petracco for their work.

Resources