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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A library of view helper functions to leverage Embedly for on-the-fly image processing.
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(//...))
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
.
MIT