Transparent inner border for images

Cut a border from the inside of an image using the mask property and two gradients.