Picture elements change image based off state

hello,

i am trying to create a picture element card for a smart switch that changes when the switch is on or off, but i keep getting an error stating, “Image required”. i can access the images at localhost:8123/local/images/on.png so i know the path is not a issue.

any suggestions would be appreciated

cheers

type: picture-elements
elements:
  - type: image
    entity: switch.amplifier_2
    state_image:
      'on': /local/images/on.png
      'off': /local/images/off.png
    tap_action:
      action: call-service
      service: automation.trigger
      target:
        entity_id: automation.toggle_amp
      data:
        skip_condition: false
    hold_action: none