Page MenuHomePhabricator

Investigate an easier and more consistent way to credit media on Space blog
Open, MediumPublic


It's important to make sure we add attribution to media used on the blog. We're doing this manually with the Caption option in WordPress' media management. To make the editorial process easier to manage I'd like to look into a better way to call attention to the attribution, and properly link it back to the source.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 28 2019, 9:15 PM

Yes, that plugin can be used to display Commons files in WordPress, by just putting the whole Commons File-page URL on a line of its own in a WordPress post. It currently gets metadata via but I've been meaning to update it to use WikibaseMediaInfo.

For input like this:

The output is like this:

We actually have this plugin installed on the blog! Initially I was thinking of using the featured image in WordPress for adding images to post, which doesn't work with @Samwilson's excellent plugin. We shifted to putting an image at the top of the article right before we announced and the use of this plugin escaped my thought.

Let's see if this will work.

I just updated this blog post to use the plugin:
The corresponding thread looks fine too, but with a little wonkiness with the caption (the "File:..." is not on a new line):

One small hesitation I have is that the plugin does not seem to work with the new WordPress editor, VisualEditor Gutenberg. Authors would have to use the "classic" editor block to insert media. Which is a little more challenging to explain and to do for novice users. If the plugin were to be updated to support Gutenberg, then this would be a good solution. Yes, this is a flagrant attempt to nerd snipe Sam. :)

Challenge accepted: I'll try to emblockify the plugin, and @Prtksxna has even volunteered to help with the design of the block's interface. :)

In the meantime, it's possible to add these URLs via the 'Embed' block.

Qgil triaged this task as Medium priority.Jul 3 2019, 9:26 AM
Qgil edited projects, added Space (Jul-Sep-2019); removed Space.
Qgil moved this task from Backlog to Started on the Space (Jul-Sep-2019) board.

WiP PR: — still needs better icons, and to figure out what the best UI is for each embed type (Commons, Wikidata, and Wikipedia).

And I might be wrong above about using the 'Embed' block as a fallback; that appears to ignore custom embed registrations and tries to go directly to the remote site to discover oembed data.

I just gave it a try and it's looking good Sam. I can even put media in a column, which is great!

We've been using the plugin for a while now. It works great with the Classic editor, but in the new block editor (Gutenberg) there seems to be a few hiccups.

If I use the Wikimedia Commons block and enter a valid file name I get a nice preview.

However, when I preview the post I see an error message.

I-want-a-pony related thought:

I wonder if there is a way to augment the existing Embed URL feature too as going that route is more common to folks familiar with WordPress (copy a URL and paste, see media embedded)

Support for the block editor is pretty buggy still, and not yet ready for use. But my idea is still to have separate blocks for each project, because we can have much more control over how it works (e.g. at some point add extra options such as custom captions).

Current work is on

As for the default Embed URL block: it's supposed to support existing embed definitions, so should already work. It doesn't, and I'm not quite sure why at the moment.

(And thanks for prodding me to get back to working on this.)

Qgil edited projects, added Space; removed Space (Jul-Sep-2019).Oct 9 2019, 7:38 AM

I've done a bit of work on the blocks (added a preview function) and changed the Commons embed format to use Structured Data captions where available. The latter uses the 'language' bloginfo key to get the caption in the right language, so should work on multisite as well (maybe... I'm not really sure how this should work, and it'd also be nice to have a proper language fallback chain rather than just English).

Version 0.3.0 of Embed Wikimedia should now be available for upgrading.

Aklapper removed a subscriber: Aklapper.Oct 31 2019, 10:16 AM
CKoerner_WMF moved this task from Inbox to Oct-Dec-2019 on the Space board.Mon, Nov 25, 10:25 PM
CKoerner_WMF edited projects, added Space (Oct-Dec-2019); removed Space.