We're using the JCrop library for cropping the profile picture. When the user changes his profile picture, the new picture still uses the old image dimensions. This works in Chrome but doesn't work in Firefox. I remove the previous image and the JCrop using the destroy:
jcrop_api.destroy();
I have also added this line of code in an attempt to clear the styles that contains the width and the height.
$('#target').removeAttr('style');