artsy/embedly-view-helpers

Name: embedly-view-helpers

Owner: Artsy

Description: A library of view helper functions to leverage Embedly for on-the-fly image processing

Created: 2015-03-09 19:36:55.0

Updated: 2015-03-09 21:13:21.0

Pushed: 2015-11-25 18:37:49.0

Homepage: null

Size: 5

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Embedly View Helpers

A library of view helper functions to leverage Embedly for on-the-fly image processing.

Example

On the server with Express and Jade

app = express();

locals.crop = require('embedly-view-helpers')(EMBEDLY_KEY).crop;
jade


img( src=crop(img.url, { width: 400, height: 400, quality: 90 }) )

Or on the client with Browserify

crop = require('embedly-view-helpers')(EMBEDLY_KEY).crop;

mg').attr('src', crop(//...))
Contributing

Please fork the project and submit a pull request with tests. Install node modules npm install and run tests with npm test. You can look at the example by passing your Embedly key as an env variable EMBEDLY_KEY=X npm run example.

License

MIT


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.