You are faced with the case that is somewhat similar to this one.
To reference a URI that points to a file on the classpath you should use a special prefix ~./
:
background-image:url(${c:encodeURL('~./images/in2.png')}
Some more details could be found in the docs for methods WebApp.getResource or Execution.locate. Real world examples can be seen in ZK source files.