Skip to content

A demo of server-side image cropping with Go and cropper.js.

License

Notifications You must be signed in to change notification settings

stevenferrer/image-cropping

Repository files navigation

Image cropping

A demo of server-side image cropping with Go and cropper.js.

How it works?

In this demo, we're using cropper.js to crop the image in the browser and send the crop details to the server to process the final result.

Why do the crop work on server?

Cropper.js uses the browser's native canvas.toBlob API which means, it will produce a reduced quality image. To mend this, we do the crop work on the server.

Running

  1. Install web app dependencies.
$ yarn // or npm install
  1. Build the web app.
$ yarn build // or npm run build
  1. Run the server.
$ go run main.go
  1. Go to localhost:3002 and start playing!

About

A demo of server-side image cropping with Go and cropper.js.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published