Resize photo before upload