Just wondering if anyone knows any neat little tricks to resize an image to fit within a specified filesize. My client runs a gallery website and is not computer savvy. What I'm trying to achieve is the ability for the client to upload an jpeg in any size, then automatically resize the image to a maximum file size (say it's a 1.2mb jpeg, and I want to change that to a 200kb jpeg).
I very familiar with restricting pixel dimensions, or preventing files of a certain size from being uploaded... I guess what I need is help finding something that will do a 'guestimate' and re-size/re-sample without resorting to a more intensive loop that creates multiple versions of the image.