examples
media config

This project is not covered by Drupal’s security advisory policy.

ABOUT

Media OpenGraph provides a new media source plugin and a default media type
using it.

This media type renders similar to pasting a link into Twitter or Facebook -
grabs the metatags/open graph tags from an external link and renders a preview
locally. The default media type maps an image metatag, title and description
with some very basic styling. It is expected that most sites would want to
custom style/theme.

Example of three rendered urls:

  • First with no description tag.
  • Second with neither image nor description tags.
  • Third with description, image and title tags.

Examples

REQUIREMENTS

Drupal 9 or 10 with media enabled. Media Library is recommended.

INSTALLATION

Install as you would normally install a contributed Drupal module. See the
install docs
if required in the Drupal documentation for further information.
Composer is required.

CONFIGURATION

Site builders can customize the mapping of metatags to fields by creating a
new media type or editing the default media type.
Field Mapping

Metatags results from fetching of pages is cached in the Drupal backend cache
for 1hr. Any mapped metadata onto fields on media are normally semi-permanent
ie, only changed if you change the source field and resave. Metatags on pages
outside of your site/control are a lot more likely to change than metadata on
files that you've uploaded. By default data is cached for 1 week.

Advanced site builders can use non-documented metatags by manually editing and
importing config.

FAQ

Any questions? Ask away on the issue queue or contact the maintainer.

Project information

Releases