Question

is it possible to convert via wro4j maven plugin imported into css image to uridata in build time? I see on their wiki run-time solution but I would like to have static files already converted. Or maybe somebody knows another plugin which can do this?

Était-ce utile?

La solution

There is virtually no difference between run-time solution and build time solution in wro4j. The CssDataUriPreProcessor is responsible for converting image url's into css data uri. In order to use it with maven plugin, just add this processor to the list of processors to be applied. Example:

preProcessors=cssImport,cssDataUri,jsMin,cssMin

Notice the "cssDataUri" alais in the list of configured pre processors. Once added, it should be applied for each pre processed resource.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top