Resizing photo before upload