A Gulp plugin that URL-encodes inline SVG data URIs in CSS to ensure cross-browser compatibility, particularly for Firefox and IE. It transforms data:image/svg+xml;utf8 URIs by percent-encoding characters like <, >, " to prevent parsing issues. Version 0.0.7 is the latest and appears to be stable with low release activity. It operates on plain CSS, intended to be used after CSS preprocessing and autoprefixing but before minification. The plugin is minimal, focusing solely on encoding SVGs, with no other transformations, making it a focused tool for a specific problem.
npm install gulp-css-urlencode-inline-svgsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Complete Gulp task that compiles SCSS, adds vendor prefixes, URL-encodes inline SVGs, then minifies CSS.
Ensure your inline SVGs use format: data:image/svg+xml;utf8, ...
Convert base64 SVGs to utf8 format before using this plugin.
Consider forking or switching to a modern alternative like gulp-replace with a custom regex.
Update to gulp 4 syntax: exports.task = ... instead of gulp.task(...)