commons-photo-url
v1.0.0
Published
Compute the Wikimedia Commons URL of a photo.
Downloads
22
Maintainers
Readme
commons-photo-url 📷
Compute the Wikimedia Commons URL of a photo.
Installing
npm install commons-photo-url
Usage
url(photo, [size])
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
.
Contributing
If you have a question, found a bug or want to propose a feature, have a look at the issues page.