An electronic device is provided. The electronic device includes a display panel, an image lens positioned under the display panel to form a fingerprint image by using light reflected from user fingerprints, an image sensor configured to convert an image into an electrical signal, a first aperture positioned on a first surface between the image lens and the image sensor to block a light component scattered on the display panel, a relay lens positioned between the first surface and the image sensor to collect light having passed through the first aperture to the image sensor, and a second aperture positioned on a second surface between the relay lens and the image sensor to block a light component scattered on the display panel.