These are chat archives for matiasgagliano/guillotine

Jun 2015
Jun 25 2015 13:41
Hello. I am having troubles with small images
Jun 25 2015 13:50

This is my code:
picture = $('#imgPhoto_PersonTab'); // Must be already loaded or cached!
picture.guillotine({ width: 250, height: 250 });

And I don't know why my picture is distorting with that params.

It is a cached image. But I don't think that this is my problem at all...
Matías Gagliano
Jun 25 2015 20:14

Hi @CristhianSalta, given that you are setting the 'src' dynamically the image might not be completely loaded when you initialize the plugin (as the comment says) causing size issues. It's a common issue (#3, #18, etc.) among newcomers, so you might want to start by wrapping the call to the plugin inside the picture's onload event and rule that one out. Check the code from the demo to get a better idea of what I'm talking about.

If you still get errors please check that you don't have any extra CSS that might be distorting the image and post the image's markup (before the plugin is initialized) and anything else that could help debug the issue.