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.
Description
Event Timeline
Didn't @Samwilson make something for this ? ;)
https://wordpress.org/plugins/embed-wikimedia/
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 https://tools.wmflabs.org/magnus-toolserver/commonsapi.php but I've been meaning to update it to use WikibaseMediaInfo.
For input like this:
https://commons.wikimedia.org/wiki/File:RUS-2016-Aerial-SPB-Peterhof_Palace.jpg
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: https://space.wmflabs.org/2019/06/27/how-do-blog-comments-work/
The corresponding thread looks fine too, but with a little wonkiness with the caption (the "File:..." is not on a new line): https://discuss-space.wmflabs.org/t/how-do-blog-comments-work/305
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.
WiP PR: https://github.com/samwilson/embed-wikimedia/pull/2 — 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 https://github.com/samwilson/embed-wikimedia/issues/8
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.)
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.
@CKoerner_WMF: Mass-moving open Space (Oct-Dec-2019) tasks to Space (Jan-Mar-2020). In case this task has been fixed (resolved) already or is not being worked on anymore (declined), please update the task status via the Add Action... → Change Status dropdown. Thanks!
As we've used WordPress over the last six months the practical use of the blog has been that most folks are more comfortable with just uploading images via WordPress and writing their own attribution. It's also proven to be less complicated than explaining how to use a non-default block.
As we look to a new community blog in its steed this will be our assumption going forward as well. I really appreciate all the help from @Samwilson in his WordPress plugin and thoughts around this concern.