Hi,

I'm not sure why, in one theme it works alright, in another it's messed up. When the overlay cropping tool is opened the image is stretched. Have been trying to do some debugging and I found that if I change this code in manualcrop.js;

var width = ManualCrop.parseInt(image.width()) || ManualCrop.parseInt(image.attr('width'));
var height = ManualCrop.parseInt(image.height()) || ManualCrop.parseInt(image.attr('height'));

TO:

var width = ManualCrop.parseInt(image.attr('width'));
var height = ManualCrop.parseInt(image.attr('height'));

I have NO clue what in the 'bad' theme could be causing ManualCrop.parseInt(image.width()) to return an incorrect value of 100. The height seems to be alright.

Leaving the js to the above changes as a quick fix for now as I'm on a production site... but any help to resolve would be nice!

Cheers

Comments

Matthijs’s picture

Hi,

There's probably some css resizing the images, are you using a liquid theme? Just make sure the image with and height are set to "auto" an hopefully your problem is fixed then.

Matthijs

Bartezz’s picture

Status: Active » Closed (fixed)

Seems like you are right, think I overlooked something in the css! Thanx