diff --git a/docs/api-resize.md b/docs/api-resize.md index ed70c7f5..a8caca9d 100644 --- a/docs/api-resize.md +++ b/docs/api-resize.md @@ -10,7 +10,7 @@ When both a `width` and `height` are provided, the possible methods by which the Some of these values are based on the [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) CSS property. -Examples of various values for the fit property when resizing +Examples of various values for the fit property when resizing When using a **fit** of `cover` or `contain`, the default **position** is `centre`. Other options are: - `sharp.position`: `top`, `right top`, `right`, `right bottom`, `bottom`, `left bottom`, `left`, `left top`. diff --git a/docs/image/api-resize-fit.png b/docs/image/api-resize-fit.png deleted file mode 100644 index 583c0ed4..00000000 Binary files a/docs/image/api-resize-fit.png and /dev/null differ diff --git a/docs/image/api-resize-fit.svg b/docs/image/api-resize-fit.svg new file mode 100644 index 00000000..06139b8e --- /dev/null +++ b/docs/image/api-resize-fit.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cover + + + + contain + + + + fill + + + + + inside + + + + + outside + + diff --git a/lib/resize.js b/lib/resize.js index 41001f9a..6677dba7 100644 --- a/lib/resize.js +++ b/lib/resize.js @@ -126,7 +126,7 @@ function isResizeExpected (options) { * * Some of these values are based on the [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) CSS property. * - * Examples of various values for the fit property when resizing + * Examples of various values for the fit property when resizing * * When using a **fit** of `cover` or `contain`, the default **position** is `centre`. Other options are: * - `sharp.position`: `top`, `right top`, `right`, `right bottom`, `bottom`, `left bottom`, `left`, `left top`.