An open API service indexing awesome lists of open source software.

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

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).