Rewrites background images url of the provided css content. This implementation takes care of most common cases such as those described bellow:
Css resource URI | Image URL | Computed Image URL |
---|---|---|
ANY | [URL]/1.jpg | [URL]/1.jpg |
/1.css | /a/1.jpg | /a/1.jpg |
/1.jpg | /1.jpg | |
1.jpg | ../1.jpg | |
../1.jpg | ../../1.jpg | |
/WEB-INF/1.css | /a/1.jpg | /a/1.jpg |
/1.jpg | /1.jpg | |
1.jpg | [WRO-PREFIX]?id=/WEB-INF/1.jpg | |
../1.jpg | [WRO-PREFIX]?id=/WEB-INF/../1.jpg | |
[X]/1.css where [X] is URL or a classpath resource where [WRO-PREFIX] is a servletContext prefix which will map WRO filter to the result url. | /a/1.jpg | [WRO-PREFIX]?id=[X]/a/1.jpg |
/1.jpg | [WRO-PREFIX]?id=[X]/1.jpg | |
1.jpg | [WRO-PREFIX]?id=[X]/1.jpg | |
../1.jpg | [WRO-PREFIX]?id=[X]/../1.jpg |
|
|