Prevent to scale up images and remove the mask applied to the resized image