MediaViewer creates a credit line from the file name, description page URL, source and license. At least the first two tend to be terribly long, making the result somewhat useless. E.g. "Iglesia de San Pedro, Teruel, España, 2014-01-10, DD 11-12 HDR" by Diego Delso. Licensed under CC BY-SA 4.0 via Wikimedia Commons - https://commons.wikimedia.org/wiki/File:Iglesia_de_San_Pedro,_Teruel,_España,_2014-01-10,_DD_11-12_HDR.JPG#/media/File:Iglesia_de_San_Pedro,_Teruel,_España,_2014-01-10,_DD_11-12_HDR.JPG - no one is actually going to use this anywhere. Instead, reusers seem to come up with their own short credit lines which are often really wrong. We should figure out how to provide a credit line that's actually useful.
- Drop the title which tends to be extremely verbose. CC (Creative Commons) version pre-4 requires preserving the title, but as everything else that's subject to "reasonable to the medium" so a backlink is probably enough (need to clear with legal). In the future (structured data or a new {{Information}} property) it would be nice to have a very short title (2-3 words) which can be used here.
- Shorten the URL. Some ways to that:
- use UrlShortener (once it's done - T44085)
- use page id: https://commons.wikimedia.org/w/index.php?curid=29838624
- use revision id: https://commons.wikimedia.org/w/index.php?oldid=145388637 - a permalink, probably not what we want
The ideal description would be something like this:
- text: [short description] (Image: [source], [license], [short URL])
- HTML: <a href="[full URL]">[short description]</a> (Image: [source], <a href="[license URL]">[license]</a>)
For now, we could probably omit the short description and the parantheses and do the rest.