Skip to content

robzwolf/trimmer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Trim simple/transparent space from around images

Resources

License

Stars

Watchers

Forks