Use image-url("switch.png").

On /foo/1/edit, ../assets/switch.png is not a valid url on my server.
But /assets/switch.png (or /assets/switch-gobbledeegook.png) is.