๐Ÿ“ฆ robzwolf / trimmer

Trim simple/transparent space from around images

โ˜… 0 stars โ‘‚ 0 forks ๐Ÿ‘ 0 watching โš–๏ธ MIT License
๐Ÿ“ฅ Clone https://github.com/robzwolf/trimmer.git
HTTPS git clone https://github.com/robzwolf/trimmer.git
SSH git clone git@github.com:robzwolf/trimmer.git
CLI gh repo clone robzwolf/trimmer
Robbie Jakob-Whitworth Robbie Jakob-Whitworth Add Vercel badge to README 1a56868 4 years ago ๐Ÿ“ History
๐Ÿ“‚ main View all commits โ†’
๐Ÿ“ .idea
๐Ÿ“ pages
๐Ÿ“ public
๐Ÿ“„ .gitignore
๐Ÿ“„ LICENSE
๐Ÿ“„ package-lock.json
๐Ÿ“„ package.json
๐Ÿ“„ README.md
๐Ÿ“„ README.md

Trimmer

Vercel

Trim images using the sharp().trim function.

Hosted at https://trim.robbie.dev

API

https://trim.robbie.dev/api/trim

Send a POST request of form-data with key image and value the binary contents of the file you want to trim.

curl

curl --location --request POST 'https://trim.robbie.dev/api/trim' \
--form 'image=@"/path/to/image.png"'

Quick Start

Local Development

npm install

# If Vercel CLI is installed
vercel dev

# If Vercel CLI is not installed
npm run dev

Production

npm install
npm run dev

Credits

Loosely based on this tutorial. https://betterprogramming.pub/upload-files-to-next-js-with-api-routes-839ce9f28430