Commons:Structured data/Modeling/Meta
How to model various types of file metadata and exif(-like) data in structured data, for files on Wikimedia Commons
Modeling various types of metadata and exif(-like) data related to Wikimedia Commons files
| Type of metadata | Wikidata property | Status |
|---|---|---|
| Type | instance of (P31) | |
| Exposure time | exposure time (P6757) | |
| F-number | f-number (P6790) | |
| Focal length | focal length (P2151) | |
| ISO speed rating | ISO speed (P6789) | |
| MIME type | media type (P1163) | |
| Number of pages | number of pages (P1104) | |
| Data size | data size (P3575) | |
| Duration | duration (P2047) | |
| Width | width (P2049) | |
| Height | height (P2048) | |
| Checksum | checksum (P4092) with qualifier determination method or standard (P459) | |
| International Standard Content Code | ISCC code (P13150) with qualifier Wikimedia page-version URL (P7569) |
Data in RDF
| Predicate | Value type | Example | Description | Related property |
|---|---|---|---|---|
rdfs:label |
String with language tag | "Otham ways [3]"@en | The captions (label in Wikibase). Same as schema:caption. |
|
rdf:type |
Fixed set of values | wikibase:Mediainfo, schema:MediaObject, schema:ImageObject |
All files have wikibase:Mediainfo and schema:MediaObject.In addition, there can be one of the following describing the type of file:
Office files (PDF, DjVu) and 3D models do not have one of these additional types. |
|
schema:caption |
String with language tag | "Otham ways [3]"@en | The captions (label in Wikibase). Same as rdfs:label. | |
schema:contentSize |
xsd:integer |
2848686 | Size of the file in bytes | data size (P3575) |
schema:contentUrl |
URI | <https://upload.wikimedia.org/wikipedia/commons/0/06/Otham_ways_%283%29_-_geograph.org.uk_-_7078464.jpg> | Direct link to the file | |
schema:dateModified |
xsd:dateTime |
2024-12-12T17:08:06Z | Date of the last revision | |
schema:duration |
xsd:duration |
PT0.88816326530612S | Duration of an audio or video file in seconds. | duration (P2047) |
schema:encodingFormat |
String | "image/jpeg" | Mime type | media type (P1163) |
schema:height |
xsd:integer |
4320 | Height of an image or video file in pixels. Not present on TIFFs. | height (P2048) |
schema:numberOfPages |
xsd:integer |
100 | Number of pages in a multi-page file (PDF, DjVu, TIFF). | number of pages (P1104) |
schema:url |
URI | <http://commons.wikimedia.org/wiki/Special:FilePath/Otham%20ways%20%283%29%20-%20geograph.org.uk%20-%207078464.jpg> | Direct link to the file via Special:FilePath (can be used in image grid) | |
schema:version |
xsd:integer |
969368863 | ID of the last revision | |
schema:width |
xsd:integer |
3240 | Width of an image or video file in pixels. Not present on TIFFs. | width (P2049) |
Properties not to use
These properties shouldn't be used
| Property | Replacement | Notes |
|---|---|---|
| Commons category (P373) | location of creation (P1071) or depicts (P180) and others | Record the information about the category instead, i.e., use depicts (P180) for what is depicted or use location of creation (P1071) if it's about where to photo was created. |
| file format (P2701) | Should use media type (P1163) instead | Duplicate information |
Examples
- File:Winter_sunset_in_Maratea_-_Italy_2015.JPGexposure time (P6757) → 0.008, f-number (P6790) → 6.3, focal length (P2151) → 28 millimeter, ISO speed (P6789) → 100, media type (P1163) → image/jpeg
- File:Umeda_Sky_Building,_Osaka,_November_2016_-02.jpgexposure time (P6757) → 0.0166, f-number (P6790) → 4.5, focal length (P2151) → 25 millimeter, ISO speed (P6789) → 320, media type (P1163) → image/jpeg