Open ryanmstokes opened 7 years ago
I want to pass an image rather than use the input and this works fine for me:
$('#image-cropper').cropit('imageSrc', '/images//images/banner.jpg')
but it seems from the documentation that if you want to pass options aswell as this you need to use imageState? I saw this mentioned in the docs and in an answer here but I cant for the life of me get this to work:
$('#image-cropper').cropit({ imageBackground: true, imageBackgroundBorderWidth: 20, imageState: { src: '/images/banner.jpg' , }, });
this doesnt work either:
$('#image-cropper').cropit({ imageState: { src: '/images/banner.jpg' , }, });
What am I doing wrong and why is one ImageSrc and the other imageState?
Thanks in advance!
$('#image-cropper').cropit({ imageState: { src: 'blank.png' , }, smallImage: 'allow' });
Seems to work with latest version
I want to pass an image rather than use the input and this works fine for me:
$('#image-cropper').cropit('imageSrc', '/images//images/banner.jpg')
but it seems from the documentation that if you want to pass options aswell as this you need to use imageState? I saw this mentioned in the docs and in an answer here but I cant for the life of me get this to work:
$('#image-cropper').cropit({ imageBackground: true, imageBackgroundBorderWidth: 20, imageState: { src: '/images/banner.jpg' , }, });
this doesnt work either:
$('#image-cropper').cropit({ imageState: { src: '/images/banner.jpg' , }, });
What am I doing wrong and why is one ImageSrc and the other imageState?
Thanks in advance!