commons-photo-url

1.0.0 • Public • Published

commons-photo-url 📷

Compute the Wikimedia Commons URL of a photo.

npm version build status dependency status dev dependency status ISC-licensed chat on gitter support me on Patreon

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.

Package Sidebar

Install

npm i commons-photo-url

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

4.24 kB

Total Files

4

Last publish

Collaborators

  • derhuerst