scottcheng / cropit

A "customizable crop and zoom" jQuery plugin.
http://scottcheng.github.io/cropit/
MIT License
875 stars 304 forks source link

Trying to load an image instead of user input but nothing happens #272

Open mynameismosa opened 6 years ago

mynameismosa commented 6 years ago

I'm trying to load an image instead of user input but nothing happens.
I tried many different approaches suggested by Mr Schott and others.
For example I tried:

$(function() { $('#image-cropper').cropit({ imageBackground: true }); $('#image-cropper').cropit({ imageState: { src: 'http://localhost/nbindexo/image/cache/catalog/1/2602-1560x2028.jpg', }, }); And this one:

$('#image-cropper').cropit({ imageBackground: true, imageState: { 'imageSrc', 'http://scottcheng.github.io/cropit/images/0-1920.jpg' } });

What am I doing wrong?