define jpeg image size
To restrict the resulting image to a maximum file size, you can use the commandline parameter-define jpeg:extent=max_value, like this: Note, this will not always work to match the exact size you wanted. You may have asked for 40kb output size, where input is 300kb, and get a result of 48kb.