Dynamic social images for plugins, themes and templates? Yes, please – WP Tavern

Things move fast on social media. You only have seconds to impress those who come across your posts promoting your latest project. You also need to consolidate a lot of information into a small window that could potentially attract a range of different users.

WordPress has done no favors to plugin and theme authors who share links to their plugins hosted in a directory. Social cards for them include a simple image, title, and description. Instead, WordPress.org could dynamically generate the social images by filling them with other data, such as ratings, active installs, etc.

This is exactly what GiveWP co-founder Matt Cromwell came up with in a new post today. “When plugin / theme / block / template authors want to share their work on social platforms, they want to link directly to their product on .org and make it look great,” he said.

He shared a picture of a previous tweet from the GiveWP Twitter account today:

The goal is to build on the concept that GitHub set in motion over the summer. In June, the platform launched a new framework for creating Open Graph images. The system generates an image on the fly with data specific to a repository, issue, pull request, etc.

In the context of WordPress plugins, themes, and templates, there are bits of information that could help highlight projects:

  • Contributors (plugins only)
  • Regional settings / Translations
  • Evaluation
  • Installed

This data is readily available at WordPress.org. All that would really be needed is the code to generate the social images with it.

Cromwell shared a mockup of what this might look like for a plugin, which is also available through the Figma project he created:

Mockup of a dynamically generated social image for a WordPress plugin, including contributor, locale, rating, and install data.
Mockup for the social image generated by a plugin.

It also has an annotated version:

An annotated version of a dynamically generated social image mockup for a WordPress plugin, including contributor, locale, rating, and install data.
Annotated version of the social image mockup.

So far, the comments have been positive in the post. It’s probably one of those easy wins that most people in the community could get.

“I would only add that I would like this to be translated automatically,” said Jean-Baptiste Audras in the post. “Which seems doable given that the language / location is provided by the URL.”

The idea is to use the translated text for the generated image if the shared link is from one of the many locale-specific subdomains on WordPress.org. So a Spanish URL would use the existing Spanish translation.

We could even apply this concept to other pages on WordPress.org, especially those that might not have an associated image. This is a treatment Courtney Engle Robertson, Web Design and Developer Advocate at GoDaddy, requested on Cromwell’s Facebook post about the idea. Workshops in the Learn section of the site, for example, might display the number of languages ​​or duration, so potential visitors have more information before clicking a link.

The best thing about this idea is that the WordPress community probably already has the basic code to make it happen. Automattic purchased the Social Image Generator plugin from Daniel Post last month. The plan is to bundle the functionality into Jetpack as part of its social media tools.

Automatically generated decorative image for the post, showcasing the output of the Social Image Generator.
Image generated using dynamic data.

With a little custom code, it’s no exaggeration to think that we could have better social images in no time. The plugin was already designed with customization in mind when I reviewed it in June.

Comments are closed.