css-b64-images
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -8,13 +8,13 @@ var fs = require('fs'), | ||
mediatypes = { | ||
'eot' : 'application/vnd.ms-fontobject', | ||
'gif' : 'image/gif', | ||
'ico' : 'image/vnd.microsoft.icon', | ||
'jpg' : 'image/jpeg', | ||
'jpeg' : 'image/jpeg', | ||
'otf' : 'application/x-font-opentype', | ||
'png' : 'image/png', | ||
'svg' : 'image/svg+xml', | ||
'ttf' : 'application/x-font-ttf', | ||
'webp' : 'image/webp', | ||
'woff' : 'application/x-font-woff' | ||
'.eot' : 'application/vnd.ms-fontobject', | ||
'.gif' : 'image/gif', | ||
'.ico' : 'image/vnd.microsoft.icon', | ||
'.jpg' : 'image/jpeg', | ||
'.jpeg' : 'image/jpeg', | ||
'.otf' : 'application/x-font-opentype', | ||
'.png' : 'image/png', | ||
'.svg' : 'image/svg+xml', | ||
'.ttf' : 'application/x-font-ttf', | ||
'.webp' : 'image/webp', | ||
'.woff' : 'application/x-font-woff' | ||
}; | ||
@@ -73,3 +73,3 @@ | ||
if(err) return cb(err, css); | ||
var ext = imagePath.substr(imagePath.lastIndexOf('.') + 1); | ||
var ext = Path.extname(imagePath); | ||
var newCss = css.replace(imageUrl, 'data:' + mediatypes[ext] + ';base64,' + img); | ||
@@ -76,0 +76,0 @@ cb(null, newCss); |
@@ -5,3 +5,3 @@ { | ||
"description": "Base64 images in your css", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"main": "lib/css-b64-images.js", | ||
@@ -8,0 +8,0 @@ "bin": "bin/css-b64-images", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
1155176