pixelate.js is a simple library and jQuery plugin to pixelate any set of images and optionally reveal them on hover. Check that by yourself.
pixelate.js can be used with or without jQuery.
// Following two lines are near identical
$('img').pixelate();
document.querySelector('img').pixelate();Or via HTML data attributes:
<img src="test.jpg" alt="" data-pixelate />valueThe percentage of pixelation to perform, a value between0and1.reveal_on_hoverReveal the image on hover.reveal_on_clickReveal the image on click.
These options may be specified by data tags, like so:
<img src="img.jpg" alt="" data-pixelate data-value="0.5" data-reveal_on_hover="false" data-reveal_on_click="false">or by jQuery/JavaScript:
$('#myimage').pixelate({ value: 0.5, reveal_on_hover: false, reveal_on_click: false });https://raw.githubusercontent.com/secondfry/license/master/LICENSE