
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
gulp-srcset-lazy
Advanced tools
Add img attribute 'srcset' for variable density/width image loading for lazyload
gulp-img-retina
repo with some improvements)Add img attribute 'srcset' for variable density/width image loading for lazyload data attributes (specifically webp).
You must have webp images in the folder which the original image in.
npm install gulp-srcset-lazy
var gulp = require('gulp');
var srcsetLazy = require('gulp-srcset-lazy');
var retinaOpts = {
// Your options here.
};
gulp.task('views', function() {
return gulp.src('./views/**/*.html')
.pipe(srcsetLazy(retinaOpts))
.on('error', function(e) {
console.log(e.message);
})
.pipe(gulp.dest('./build'));
});
You put html in:
<figure>
<img src="images/default/example.webp" alt="example image" />
</figure>
And get html out:
<figure>
<img data-src="images/default/example.webp" alt="example image" data-srcset="images/default/example.webp 1x, images/default/example@2x.webp 2x, images/default/example@3x.webp 3x, images/default/example-mobile.webp 480w" />
</figure>
Type: Object
Default:
srcsetLazy({
suffix: {
'1x': '.webp',
'2x': '@2x.webp',
'3x': '@3x.webp'
}
})
The suffix will insert to image's path, the key is resolution, and value is suffix.
You can also use width srcset params eg.
srcsetLazy({
suffix: {
'1x': '.webp',
'2x': '@2x.webp',
'3x': '@3x.webp',
'480w': '-mobile.webp'
}
})
SVG's are ignored
FAQs
Add img attribute 'srcset' for variable density/width image loading for lazyload
The npm package gulp-srcset-lazy receives a total of 0 weekly downloads. As such, gulp-srcset-lazy popularity was classified as not popular.
We found that gulp-srcset-lazy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.