Reverts to previous code but with updated and resized image