autoresize uploaded images

When uploading images with width larger than
$opts['roots'][]['uploadMaxWidth'] or height larger than
$opts['roots'][]['uploadMaxHeight'] it will try to resize these to the
given size