Skip to content

Commit

Permalink
fixed issue where transform withoutEnlargement false would crash any …
Browse files Browse the repository at this point in the history
…image transformation
  • Loading branch information
marcos committed Sep 22, 2015
1 parent 9cb75dc commit 47e8779
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kamu",
"version": "1.1.0",
"version": "1.1.1",
"description": "SSL Asset Proxy",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion proxy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,12 @@ var transformMedia = function( options ) {
extractDone = false,
transformer;

transformer = sharp();

// images won't enlarge past its original size
// todo: I don't know if this is desirable for all operations
if ( config.transformWithoutEnlargement ) {
transformer = sharp().withoutEnlargement();
transformer.withoutEnlargement();
}

_.each( options, function( value, operation ) {
Expand Down

0 comments on commit 47e8779

Please sign in to comment.