VanillaGram

VanillaJS script to apply filters for images similar to Instagram

What is it?

VanillaGram is an easy-to-use Vanilla JS plugin, based on the original simpleFilter.js, created by Vivien Ilett, with a library of photo filters for your website. Choose from eight filters and six modifiers to create subtle effects. See below for examples or go straight to the instructions.

Here are some examples of the effects you can achieve with VanillaGram

fade

Slight fade for a dreamy effect

vintage

Cool tones and high contrast

greyscale

No colour, medium contrast

luxen + lightleak

Bright and energetic

subtle

Light and airy

olive

Deeper contrast, warm tones

beach

Cool tones and low blacks

oldtimey + shadow

Moody and lovely

Other options

lightleak1

lightleak2

vignette shadow

lightleak3

How to use it

Start by downloading the vanillagram.js file and link it in your HTML document.

<script src="path/to/vanillagram.js"></script>

If you'd only like to target some of your images, add classes to the images you'd like to target. Please note that images can only be targeted locally. Perhaps like this:

<img src="path/to/image.jpg" class="filter1">

Target your image and add your chosen filter and/or lightleak/shadow option. The plugin detects if the image was fully loaded and only then apply the filters.

VanillaGram('.filter1', { filter: 'fade', lightleak: 'lightleak1', shadow: 'drama' });

Ta-da! Your images should be fresh and fancy now. Colours manipulate differently on different images, so play around with different options to find a filter that suits the images best. Shadows and light leaks should be used sparingly.

Note: if you are testing this from your computer, this won't work. You will need to run testing on a local server :)

Full list of image options

Filters

  • fade
  • |
  • vintage
  • |
  • greyscale
  • |
  • luxen
  • |
  • subtle
  • |
  • olive
  • |
  • beach
  • |
  • oldtimey

Light Leaks

  • lightleak1
  • |
  • lightleak2
  • |
  • lightleak3

Shadows

  • vignette
  • |
  • drama