I am using CSSGram on my website to make images have Instagram-like filters. This is the method below to add a filter to a image:
The styles are based on a img
sitting inside figure
element. You could automatically wrap all of the images in a figure element like so
$(function() {
$("img").wrap("");
});
However, you might want to be more specific with that selector as it could break other images like logos, social icons etc
Working example here:
https://jsfiddle.net/cs9asjhs/