Skip to content

Add dynamic social share images for plugin pages (Meta #5926)#706

Open
mathetos wants to merge 2 commits into
WordPress:trunkfrom
mathetos:add-plugin-share-images-5926
Open

Add dynamic social share images for plugin pages (Meta #5926)#706
mathetos wants to merge 2 commits into
WordPress:trunkfrom
mathetos:add-plugin-share-images-5926

Conversation

@mathetos

@mathetos mathetos commented Jul 8, 2026

Copy link
Copy Markdown

Fixes https://meta.trac.wordpress.org/ticket/5926

Plugin pages now get a proper preview image when someone shares a link on social media. You get the title, description, icon, and a few key stats in one clean 1200x630 image.

This follows what Dion asked for on #5926: build it in PHP, keep it simple, and serve dynamic images the same way we already do with geopattern icons so the CDN can cache them. Jetpack stays installed, and on plugin pages we let it step aside for Open Graph and Twitter tags so social platforms use our image.

The layout uses a small set of constants and a straightforward stats grid that holds up across different plugin titles and descriptions. The change stays focused on the plugin directory and theme meta tags, and it passes PHPUnit and PHPCS.

Sample output

Gutenberg share image sample

Test plan

  • PHPCS passes on new share image files
  • Plugin Directory PHPUnit suite passes (127 tests)
  • Visit /share-image/{slug}.jpg on a plugin page and confirm JPEG renders
  • View page source on a plugin page and confirm og:image points at the share image URL
  • Confirm Jetpack does not output duplicate og:image tags on plugin pages

Plugin pages now get a proper preview image when someone shares a link on social media. You get the title, description, icon, and a few key stats in one clean 1200x630 image.

This follows what Dion asked for on #5926: build it in PHP, keep it simple, and serve dynamic images the same way we already do with geopattern icons so the CDN can cache them. Jetpack stays installed, and on plugin pages we let it step aside for Open Graph and Twitter tags so social platforms use our image.

The layout uses a small set of constants and a straightforward stats grid that holds up across different plugin titles and descriptions. The change stays focused on the plugin directory and theme meta tags, and it passes PHPUnit and PHPCS.

Sample output (Gutenberg):

![Gutenberg share image sample](wordpress.org/public_html/wp-content/plugins/plugin-directory/docs/share-image-sample-gutenberg.png)
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props webdevmattcrom.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant