Do Dynamic Icons with Template work with custom Icons?

Trying to dynamically change icons using custom icons, is it possible?
I’ve added a www folder in my /.homeassistant folder with several icon files.
Copied the code from documentation changing only the location of my icons
It’s displaying blank for the icon.

- platform: template
      friendly_name: 'Day/Night'
      value_template: '{% if is_state("sun.sun", "above_horizon") %}Day{% else %}Night{% endif %}'
      icon_template: >
          {% if is_state("sun.sun", "above_horizon") %}/local/phase.png{% else %}mdi:amazon{% endif %            }

I think icons are only mdi icons.
You should set entity_picture if you want to support arbitrary image. I’m not sure template supports it though.

Forums tip: Use triple-backtick to format code.
code here

Thanks for the reply triple backtick?