ImageAreaSelect: preselect biggest thumbnail possible respecting aspectRatio
This is how I first tried: $('#thumbnail').imgAreaSelect({ x1: 5, y1: 5, x2: $('#thumbnail').width(), y2: $('#thumbnail').width()*0.66, aspectRatio: '1:0.66' }); But some of the cropped image stay off the overflow... This seems to make a preselection for most of the image resolutions I tried... var thwidth = $('#thumbnail').width(); var thheight = $('#thumbnail').height(); aspectRatio = 0.66; $('#thumbnail').imgAreaSelect({ x1: 5, y1: 5, x2: thwidth - 80, y2: (thwidth - 80) * aspectRatio, aspectRatio: '1:0.66' }); But it won't select the maximum possible; plus it looks a bit dirty to me... How