Closed jednano closed 9 years ago
I don't have time at the moment to integrate this feature. If you get something that works, please feel free to open a PR.
I will put something together. I'm still curious how you feel about this feature and if you might have a better idea for the middleware case.
This plugin was created for usage in development stage so I think that the plugin shouldn't be used in middleware at production because will slow down your server response. Also I think that we will have problems with base64 option because the plugin was built around spritesmith module which needs to get all images.
I'm not suggesting it be used for production middleware. We use an Express server for our development server. Anyway, I think I can create a completely separate plugin for this task, come to think of it. Thanks for your feedback.
How do you feel about introducing an
embedDataUri
option to base64-encode the requested image directly in the CSS? I'm thinking this would be useful with postcss-middleware when you want to serve images directly instead of building a sprite sheet every time a CSS file is requested.