Update _resize function from ImageService