https://github.com/simon04/wikimedia-commons-file-path
Returns the image/thumbnail file path for Wikimedia Commons
https://github.com/simon04/wikimedia-commons-file-path
Last synced: 10 months ago
JSON representation
Returns the image/thumbnail file path for Wikimedia Commons
- Host: GitHub
- URL: https://github.com/simon04/wikimedia-commons-file-path
- Owner: simon04
- License: isc
- Created: 2018-08-28T12:24:33.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T05:03:49.000Z (over 3 years ago)
- Last Synced: 2025-09-11T06:54:14.264Z (11 months ago)
- Language: JavaScript
- Size: 849 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# wikimedia-commons-file-path
Returns the image/thumbnail file path for Wikimedia Commons
```javascript
const commons = require('../build/wikimedia-commons-file-path');
console.log(commons('File:Innsbruck.jpg'));
// https://upload.wikimedia.org/wikipedia/commons/2/2a/Innsbruck.jpg
console.log(commons('File:Innsbruck.jpg', 300 /*px*/));
// https://upload.wikimedia.org/wikipedia/commons/thumb/2/2a/Innsbruck.jpg/360px-Innsbruck.jpg
```
To compute the MD5 hash, this library uses [`blueimp-md5`](https://www.npmjs.com/package/blueimp-md5).