diff --git a/lib/resize.js b/lib/resize.js index dcdbd07..2e17456 100644 --- a/lib/resize.js +++ b/lib/resize.js @@ -58,10 +58,11 @@ function scale(path, type, size) { export default function resize(path, type, currentSize, newSize) { debug('Resizing'); const ratio = 970 / currentSize.width; + debug(newSize.width, ratio); if (newSize.width <= 150) { debug('Cover'); return cover(path, type, newSize); - } else if (newSize.width > 970 && ratio > 1) { + } else if (newSize.width >= 970 && ratio < 1) { debug('Scale'); newSize.height = currentSize.height * ratio; // eslint-disable-line no-param-reassign return scale(path, type, newSize);