ESP32 Camera - images corrupted?

EDIT: For anyone else that has this issue, I replaced the camera module and that fixed it, it must have been faulty.

Hi,

I’ve managed to get my ESP32 cam set up with ESPHome however the images seem to be corrupted? I’m not sure if this is a software or hardware issue. I don’t have another ESP32 cam to test unfortunately.

I’ve tried a few different power supplies so I don’t think that is it. I’m brand new to ESP Home so I’m not too sure where to start with troubleshooting, any help would be appreciated!

This is my config yaml:

substitutions:
  # Modify variables based on your settings
  hostname: "esp32cam"

esphome:
  name: $hostname
  platform: ESP32
  board: esp32dev
wifi:
  ssid: redacted
  password: redacted
  fast_connect: True

# Enable logging
logger:

# Enable Home Assistant API
api:
  reboot_timeout: 0s

web_server:
  port: 80

ota:
- platform: esphome

time:
  - platform: homeassistant
    id: homeassistant_time

# ESP32-CAM
esp32_camera:
  external_clock:
    pin: GPIO0
    frequency: 10MHz
  i2c_pins:
    sda: GPIO26
    scl: GPIO27
  data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35]
  vsync_pin: GPIO25
  href_pin: GPIO23
  pixel_clock_pin: GPIO22
  power_down_pin: GPIO32

  resolution: 640x480
  jpeg_quality: 10

  name: mycamera

# Flashlight
output:
  - platform: gpio
    pin: GPIO4
    id: gpio_4

## GPIO_4 is the flash light pin
light:
  - platform: binary
    output: gpio_4
    name: $hostname light




Note: I’m using this board: https://www.aliexpress.com/item/1005006501528278.html?spm=a2g0o.order_list.order_list_main.11.43e81802Ouveo7 (ESP32-CAM-MB)