Example: https://kawa-.github.io/croppie-example/
https://github.com/foliotek/croppie is very nice and I made a simple example for my usage.
$ git clone https://github.com/kawa-/croppie-example
$ cd croppie-example
# run the server (you can use another way)
$ php -S 127.0.0.1:4040
# visit: http://127.0.0.1:4040
# view codes!