Croppie: image not loading

Created on 14 Nov 2017  路  4Comments  路  Source: Foliotek/Croppie

I have a Croppie instance in my page. It works perfectly if I select an image in my html input file.
Before loading a file to it through the input file I want to show a default image.
I use a simple javascript like:
$uploadCrop.croppie('bind', {
url: 'folder/imagename.jpg',
}).then(function(){
console.log('feedback');
});
It seems to work, as the console.log is showing the message BUT the image is not appearing. Also if I drag from the top left corner it shows the image I bound, but it is semitransparent, like when you drag an image on the web... and it shows just for the time I drag, when I release the mouse button it disappears...what's the matter?

Most helpful comment

Solved by myself! Croppie gets in trouble together with a modal form when it has the class "fade"...if anyone has the same problem, just remove that

All 4 comments

I partially understood what's the problem: opacity is set to 0. I have forced it to 1. Now I can see the image but it behaves in an odd way: I can't drag it around until I zoom. Before that whatever attempt to drag the image it's not working....When I zoom I can drag it around. But if I zoom all the way out it gets too small, can't even see the image....What can I do? Is there a way to set initial zoom not to that point?

Solved by myself! Croppie gets in trouble together with a modal form when it has the class "fade"...if anyone has the same problem, just remove that

Glad to see you found the solution.

Removed "fade" class on modal, it worked.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wyzard picture wyzard  路  3Comments

stdCh picture stdCh  路  8Comments

iKonrad picture iKonrad  路  8Comments

nicolasvahidzein picture nicolasvahidzein  路  7Comments

powerbuoy picture powerbuoy  路  5Comments