Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Lousy Load is a JavaScript lazy loading plugin for images. End of speech.
npm install --save lousy-load # npm
yarn add lousy-load # yarn
Or download the latest release
Vanilla JavaScript
<img data-src="path/to/image.jpg" width="400" height="300">
<script src="lousy-load.min.js"></script>
<script>
var ll = new lousyLoad(document.body);
</script>
jQuery
<img data-src="path/to/image.jpg" width="400" height="300">
<script src="lousy-load.min.js"></script>
<script>
$('body').lousyLoad();
</script>
<img
class="ll-image"
data-src="path/to/image.jpg"
width="400"
height="300">
<img
data-nowrap
class="ll-image"
data-src="path/to/image2.jpg"
width="400"
height="300">
<script src="lousy-load.min.js"></script>
<script>
var ll = new lousyLoad(document.body, {
selector : '.ll-image',
threshold : 100,
});
</script>
Vanilla JS
new lousyLoad([container[, options]])
jQuery
$(container).lousyLoad([options]);
container
container
is the DOM element that contains the images you want to lazy load.
options
threshold
number - Number of pixels above and below the viewport Lousy Load will check for images.
selector
string - Selector Lousy Load will use to populate list of lazy loaded images.
wrapElement
boolean - If true images will be wrapped in a span
tag. Useful for loading transitions.
FAQs
JavaScript lazy load plugin with responsive image support
The npm package lousy-load receives a total of 0 weekly downloads. As such, lousy-load popularity was classified as not popular.
We found that lousy-load 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.