https://github.com/derhuerst/commons-photo-url
Download Wikimedia Commons photos.
https://github.com/derhuerst/commons-photo-url
commons creative-commons wikimedia wikipedia
Last synced: 4 months ago
JSON representation
Download Wikimedia Commons photos.
- Host: GitHub
- URL: https://github.com/derhuerst/commons-photo-url
- Owner: derhuerst
- License: isc
- Created: 2016-08-09T02:40:47.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2020-05-03T15:53:23.000Z (about 5 years ago)
- Last Synced: 2025-02-10T00:06:20.071Z (4 months ago)
- Topics: commons, creative-commons, wikimedia, wikipedia
- Language: JavaScript
- Homepage: https://github.com/derhuerst/commons-photo-url
- Size: 9.77 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# commons-photo-url 📷
**Generate the [Wikimedia Commons](https://commons.wikimedia.org/wiki/Main_Page) URL of a photo.**
[](https://www.npmjs.com/package/commons-photo-url)
[](https://travis-ci.org/derhuerst/commons-photo-url)
[](https://david-dm.org/derhuerst/commons-photo-url)
[](https://david-dm.org/derhuerst/commons-photo-url#info=devDependencies)

[](https://gitter.im/derhuerst)
[](https://patreon.com/derhuerst)## Installing
```
npm install commons-photo-url
```## Usage
```js
url(photo, [size])
``````js
const url = require('commons-photo-url')console.log(url('Hazelnuts.jpg', url.sizes.medium))
// -> https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Hazelnuts.jpg/800px-Hazelnuts.jpg
```*Note:* `url.sizes` is compatible with [`flickr-photo-url`](https://github.com/derhuerst/flickr-photo-url).
## Contributing
If you **have a question**, **found a bug** or want to **propose a feature**, have a look at [the issues page](https://github.com/derhuerst/commons-photo-url/issues).