convert original.jpeg -define jpeg:extent=2048kb output.jpg

http://stackoverflow.com/questions/6917219/imagemagick-scale-jpeg-image-with-a-maximum-file-size