Restore backup from a big mistake

From my recollection, you need to use type: 'custom:config-template-card' to template the image field or use card mod.

Look here

I would suggest an alternative mehod. Create a sensor template that references the image and state of the text input helper.

An example

     text_input:
       friendly_name: "Text Input"
       unique_id: text_input
       value_template: |
         {% set level = states('input_text.test')  %}
    
       entity_picture_template: >-
          {% set level = states('input_text.test')  %}
          {% set path = "/local/pics/" %}
          {% set ext = ".png"%}
          {{[path,level,ext]|join("")}} 

I created a 1.png and a 2.png and the image of sensor.text_input changes based on the state of the input_text.test