postcss-plugin-image-to-url
v0.1.0-beta.2
Published
PostCSS plugin image-to-url
Maintainers
Readme
PostCSS Plugin Image To Url 
PostCSS plugin image-to-url.
.foo {
/* Input example */
background-image: url(http://a.com/images/logo.gif);
color: #f00;
background: url("./assets/images/logo.jpg") no-repeat;
}.foo {
/* Output example */
background-image: url(http://a.com/images/logo.gif);
color: #f00;
background: url("http://a.b.c/images/logo.jpg") no-repeat;
}Usage
postcss([ require('postcss-plugin-image-to-url')({
disable: false, // disabled
localBaseDir: '/images/',
remoteBaseLink: 'http://a.b.c/images/'
}) ])Options
| prop | value | default | require |
| --- | --- | ----- | --- |
| disable | true / false | false | false |
| localBaseDir | local image path | | true |
| remoteBaseLink | remote link base | | true |
See PostCSS docs for examples for your environment.
