简体   繁体   中英

how do you initiate cropper to crop image in fengyuanchen cropper

I am using the fengyuanchen cropper and am using the crop-avatar example and want to pre-load an image into the cropper on load ready for editing. Ie an image which has already been uploaded to the server.

I have spent hours on this and got no where does anyone know how to do this?

https://github.com/fengyuanchen/cropper/tree/master/examples/crop-avatar

I have done this with pulling the base64 from the server and populating on load.

// Added a class or just load
var $image = $('.img-container > img');

Maybe I'm missing it but, I put the image in 2 spots on for view and one for crop.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM