Change image Icon based on Switch state

Hi… iam struggeling with a template, I have found several examples, but none of then do, what I want…
alle of them are based on colored backgrounds, and build in icons

i have two png icons, i want eg. 1.png shown when item state is ON, and 2.png shown when item state is OFF, is that possible?

(icons are saved in /static/ folder