Page MenuHomePhabricator

Add OpenGraph tags to blog
Closed, DeclinedPublic

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

This is great! There has been a desire for this for a few years already, but nobody got around to actually implement it.
As discussed on IRC, some VIP-specific information is at .

CCing @Slaporte just in case there are any considerations re licensing, and @EdErhart-WMF FYI (the patch appears to set as the associated Twitter account, which I guess matches the Comms team's current social media approach).

Many thanks, @Ladsgroup. Looking forward to seeing what Stephen has to say!

@MelodyKramer @EdErhart-WMF: I talked to Jacob from legal (Can't find his phab username, sorry) and he says it's okay to have them in one condition that main image in the posts have copyright notice inside the picture (just "CC BY-SA 3.0" without quote marks) like a watermark. If it's not possible it's still might be okay to have it too but it takes some time to check laws as it's more ambiguous.

Well, I'm not sure how feasible it is technically at this point to include an accurate copyright notice like that, but I do know that some other people of the legal team already gave such questions some thought a while ago (I sent @Slaporte a link last week; it's probably best to keep that discussion focused instead of opening several channels).

Jumping in here. I'm hoping to help on this one to take a bit off Stephen's plate. What I was saying with @Ladsgroup is that having the CC notice with the picture is the ideal, since it makes it the easiest to make sure we're doing the license right. But it's probably okay to do this even if we can't make that work. I want to take a day or two to look into it a bit more.

Update. Legal is good with going forward on this. As a note, when filling these out, the CC license information should be in the name fields, to avoid it getting cut off for viewers on a mobile device, as it seems like the description field for some of these tags does not always display. The CC info can be pretty short. Something like [photo name] by [creator] CC [license type and version number]

Okay, just to be crystal clear. I made an example. I moved everything in this blog post to a file in labs (so I can test it publicly) and then added these tags:

<meta property="og:title" content="Wikimedia Blog &raquo; New dataset shows fifteen years of Wikipedia&#8217;s quality trends Comments Feed"/>
<meta property="og:description" content="Looking to study how Wikipedia articles have improved over time?  We’ve generated a dataset that tracks the quality of articles at monthly intervals over the entire 15-year history of Wikipedia across multiple languages—that’s 670 million assessments! Drawing by Edward Dana and James Dana via the British Library, public domain/CC0"/>
<meta name="twitter:card" content="summary_large_image"/>
<meta property="og:image" content=""/>

Twitter validator shows this:

image.png (596×696 px, 303 KB)

Facebook validator shows this:

image.png (537×709 px, 345 KB)

As you see, the copyright notice I added to the description is being cut but honestly adding it to title ("Wikimedia Blog - New dataset shows fifteen years of Wikipedia's quality trends Comments Feed" to " Wikimedia Blog - New dataset shows fifteen years of Wikipedia's quality trends Comments Feed - Image: CC0") doesn't look good and I don't anywhere else to add it beside description.

How about adding it to the beginning of the description instead of the end? Not pretty, but I guess a Twitter card/FB share with image+headline+licensing stuff+a little bit of description is better than nothing.

Another option would be to adapt an existing watermarking plugin (such as this VIP-approved one) to automatically create separate thumbnails with the licensing text embedded as watermark (a bit like Share-A-Fact but with less text in the image). However, that surely is a lot more work (we will want to avoid adding watermarks to the images as used in the posts themselves, and also the embedded text will depend on the image, so we probably can't use such a plugin out of the box).

@Jrogers-WMF out of curiosity, how is this use case different from (say) a thumbnail on Wikipedia? The license would be available upon clickthrough.

Also, "[photo name] by [creator] CC [license type and version number]" is not short when it comes to social media. ;-)

Clarifying that this is approved from Legal as long as the CC license is present, putting it in the title field is not a requirement. I was suggesting use of title as a way to avoid it being cut off, but it's approved as long as the information is present.

Not yet, I'm trying to apply what legal said and It's not easy, gave it a try last weekend and failed but it's WIP just slow.

I gave another try today and every way I tried it was impossible. This is outside of my knowledge. Also, It's really strange to me that showing data requires license info, even companies with strict rules on copyright don't do it on fully copyrighted images like Google (, facebook ( ), netflix (, Airbnb ( All of these examples have og:image tag without any notice about the copyright in the description or title tags.
I remove myself as assignee of this task.

Thanks anyway, @Ladsgroup! Just to confirm and for the benefit of others who may pick up this task one day: Did your exploration include any of the options mentioned in T166752#3336898 (adding the image information to the beginning of the description, or adapting a watermarking plugin)?

Yes, That extension requires one watermark per blog not one watermark per blogpost, Also it only accepts images and not text.

Varnent subscribed.

This site has been closed and is no longer being actively developed.