The invention discloses a
camera module and an electronic device. The
camera module comprises a circuit board, a lens unit, a packaging frame, a photosensitive
chip and an
optical filter. The lens unit and the circuit board are oppositely arranged. A first hollow cavity is defined by the packaging frame, the circuit board and the lens unit are arranged at the two ends of the packaging frame respectively so that the first hollow cavity can be sealed, the photosensitive
chip is arranged on the circuit board corresponding to the first hollow cavity, the side, facing the circuit board, of the photosensitive
chip is electrically connected with the circuit board, and the
optical filter is attached to the side, deviating from the circuit board, of the photosensitive chip. According to the cameramodule, the side, facing the circuit board, of the photosensitive chip is electrically connected with the circuit board, and the
optical filter is attached to the side, deviating from the circuit board, of the photosensitive chip, so that the purposes of reducing the size of the
camera module and reducing the weight of the camera module can be achieved, and the development trend of light weight, thinness and small size of current electronic device is met.