I am a warlock in a place I am not supposed to be in. I hear someone walking toward the area I am in. I am unsure if they are already close enough to tell that the door is open. I cast Silent Image on the room and present an image of the room with no one in it. They walk past the doorway, perhaps glancing in perhaps not, but do not see me because the silent image is of the room as it would normally appear. They pass by, and after a few moments I continue snooping.
Silent Image Description:
You create the image of an object, a creature, or some other visible phenomenon that is no larger than a 15-foot cube. The image appears at a spot within range and lasts for the duration. The image is purely visual; it isn't accompanied by sound, smell, or other sensory effects.
You can use your action to cause the image to move to any spot within range. As the image changes location, you can alter its appearance so that its movements appear natural for the image. For example, if you create an image of a creature and move it, you can alter the image so that it appears to be walking.
Physical interaction with the image reveals it to be an illusion, because things can pass through it. A creature that uses its action to examine the image can determine that it is an illusion with a successful Intelligence (Investigation) check against your spell save DC. If a creature discerns the illusion for what it is, the creature can see through the image.
For consideration: Can you create an illusion of empty space?
Does the spell Silent Image allow you to cast an image of an empty room, hiding the room's occupants in 5E?
Follow-up question: to come