diff --git a/README.md b/README.md index 648130d..da08b03 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,9 @@ Then call the API as, for example: You can also specify a format using the querystring `?format=` and indicating one of the following: `avif`, `gif`, `heif`, `jpeg`, `jpg`, `pdf`, `png`, `svg`, `tiff`, `webp`. (Note: Experimental!) +Another querystring parameter is `fit` which can be `cover`, `contain`, `fill`, `inside`, `outside` (Ref: [sharp](https://sharp.pixelplumbing.com/api-resize#resize)). Default is `inside`. + + ## Docker To build the Docker image: diff --git a/bun.lockb b/bun.lockb index bd4cd38..7abc05e 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/index.ts b/index.ts index c3c58dc..e326a22 100644 --- a/index.ts +++ b/index.ts @@ -89,6 +89,7 @@ const homepage = html`
Then call the API as, for example:
/api/imgresize/200/200/https%3A%2F%2Fmemori.ai%2Flogo.png
You can also specify a format using the querystring ?format= and indicating one of the following: avif, gif, heif, jpeg, jpg, jp2, pdf, png, svg, tiff, webp. Note: Experimental!
Another querystring parameter is ?fit= which can be one of the following: cover, contain, fill, inside, outside (Ref: sharp docs). Default is inside.