resizing pictures before upload