FIX: Downsize image last when saving uploads (PR #13458)

The other processing operations, such as fixing orientation or cropping, can in rare cases increase the size of the uploaded image. Running the downsize step after all these operations should create the best image possible.

GitHub