mwoffliner icon indicating copy to clipboard operation
mwoffliner copied to clipboard

Provide image metadata (in particular author and license)

Open kelson42 opened this issue 7 years ago • 6 comments

In fact many metadata:

  • Author (legal requirement)
  • License (legal requirement)
  • Title
  • Description

The problem is that Mediawiki does not provide them in a machine readable manner. Here is the upstream bug: https://phabricator.wikimedia.org/T585

This bug has been migrated from https://sourceforge.net/p/kiwix/bugs/55/

kelson42 avatar Jul 21 '18 09:07 kelson42

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

stale[bot] avatar Jul 11 '19 10:07 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

stale[bot] avatar Oct 01 '19 07:10 stale[bot]

The upstream issue has been declined and has been very old anyway. The feasability of this issue should be reassessed.

kelson42 avatar Jul 16 '25 10:07 kelson42

At least on Wikimedia wikis we can get the image metadata in a machine readable format using the API provided by Extension:CommonsMetadata, for other wikis this is likely not the case. https://en.wikipedia.org/w/api.php?action=query&prop=imageinfo&format=json&iiprop=extmetadata&iilimit=10&titles=File%3ACommon%20Kingfisher%20Alcedo%20atthis.jpg

However how exactly would we present the metadata even if could reliably get it? On the wikis itself this information is located on the File pages. The above extension is pulling the information from the DOM of the File pages as well. The easiest solution might be to include these file pages in the ZIM, however that could easily increase the size of our ZIMs significantly.

Markus-Rost avatar Jul 16 '25 13:07 Markus-Rost

At least on Wikimedia wikis we can get the image metadata in a machine readable format using the API provided by Extension:CommonsMetadata, for other wikis this is likely not the case. https://en.wikipedia.org/w/api.php?action=query&prop=imageinfo&format=json&iiprop=extmetadata&iilimit=10&titles=File%3ACommon%20Kingfisher%20Alcedo%20atthis.jpg

OK, that would be already a great start!

However how exactly would we present the metadata even if could reliably get it? On the wikis itself this information is located on the File pages. The above extension is pulling the information from the DOM of the File pages as well. The easiest solution might be to include these file pages in the ZIM, however that could easily increase the size of our ZIMs significantly.

This question is open and unanswered to me as well. We could write the information in the DOM and create a custom JS script displaying a "metadata overlay"?

kelson42 avatar Jul 16 '25 14:07 kelson42

This question is open and unanswered to me as well. We could write the information in the DOM and create a custom JS script displaying a "metadata overlay"?

Rather than speaking about very technical details (which we will solve in due time), the core of the question is to me is more about the UI/UX: "how do we want to display this information to look, and how to do it in a reliable and non-disruptive way?"

Especially since we need a way which is reliable for all (wikimedia) wikis and all kind of images. We will have images which already have a tooltip attached, we will have very small images, we know that changing image size is going to mess the layout under multiple occasions.

benoit74 avatar Jul 17 '25 09:07 benoit74