The easiest way to start using the library is to include it on the page and turn on autoload:

  data-api-key="<YOUR PIXBOOST API KEY>"

pixboost.bundle.min.js script includes picturefill library that adds support of <picture> element to old browsers and lozad.js for lazy loading.

autoload option will run picture() and image() functions (see below) on document load.

Alternatively, you can include all components separately:

<!--Responsive images-->
<script type="text/javascript" src=""></script>

<!-- Lazy loading-->
<script type="text/javascript" src=""></script>

<script type="text/javascript" src=""></script>

Library provides two main functions:

  • picture() - to deal with responsive images.
  • image() - to optimise all images that are device agnostic.

results matching ""

    No results matching ""