Electronic device with camera module

An electronic device includes a camera module which includes an infrared cutoff filter which includes an effective filtering area and a peripheral area in contact with the effective filtering area. An opaque coating layer is arranged in the peripheral area to prevent unnecessary external light from being inputted to an image sensor.