Avoid redundant local file copy before resizing

Change-Id: I56736a1d0d20589b280efda195b064e23792c0ea