Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix so that portrait photos are correctly resized as well as landscap…

…e ones
  • Loading branch information...
commit f2b9275c937dd6d2d6b31eb51c918fb05e5201f4 1 parent 4406933
Edmund von der Burg evdb authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/image-proxy.js
6 lib/image-proxy.js
View
@@ -72,15 +72,15 @@ module.exports = function () {
var image = gm( tempImageFile );
if( req.param('resize') ) {
- var newWidth = req.param('width');
- var newHeight = req.param('height');
+ var newWidth = req.param('width') || '';
+ var newHeight = req.param('height') || '';
if( !newHeight && !newWidth) {
res.send('need one of height and/or width to resize', 404);
return;
}
- image = image.resize(newWidth, newHeight);
+ image = image.resize(newWidth + 'x' + newHeight);
}
if ( req.param('grayscale')) {
Please sign in to comment.
Something went wrong with that request. Please try again.