postcss-plugin-image-to-url
0.1.0-beta.2 • Public • Published PostCSS Plugin Image To Url
PostCSS plugin image-to-url.
.foo {
background-image: url(http://a.com/images/logo.gif);
color: #f00;
background: url("./assets/images/logo.jpg") no-repeat;
}
.foo {
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,
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.
Package Sidebar
Install
npm i postcss-plugin-image-to-url
Weekly Downloads