Skip to main content

Integration of lazysizes, a lightweight lazy loader, into Plone.

Project description

<nav class="contents" id="table-of-contents" role="doc-toc">

Table of Contents


Life, the Universe, and Everything

This package integrates lazysizes, a lightweight lazy loader, into Plone.

lazysizes is a fast, SEO-friendly and self-initializing lazyloader for images (including responsive images picture/srcset), iframes, scripts/widgets and much more. It also prioritizes resources by differentiating between crucial in view and near view elements to make perceived performance even faster.

Mostly Harmless

Got an idea? Found a bug? Let us know by opening a support ticket.

Don’t Panic


To enable this package in a buildout-based installation:

  1. Edit your buildout.cfg and add add the following to it:

    eggs =

After updating the configuration you need to run ‘’bin/buildout’’, which will take care of updating your system.

Go to the ‘Site Setup’ page in a Plone site and click on the ‘Add-ons’ link.

Check the box next to collective.lazysizes and click the ‘Activate’ button.

How does it work

This package adds a transform to the transform chain to integrate lazysizes into Plone.

The transform looks for all the <img> and <iframe> elements inside the content and does the following:

  • appends a lazyload class

  • transforms the src attribute into a data-src attribute

  • if the element is an <img>, uses an spinner as src attribute (this is done to maintain valid HTML code)

The transform is only applied to anonymous users.


  • implement support for responsive images with srcset and automatic sizes attribute

  • replace spinner with low resolution image scale (if not to expensive to calculate)

  • allow blacklisting images (lazing loading feature could be duplicated on some carousels)

Share and Enjoy

collective.lazysizes would not have been possible without the contribution of the following people:

You can find an updated list of package contributors on GitHub.

Development sponsored by Simples Consultoria.


1.0a1 (2016-01-05)

  • Initial release.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

collective.lazysizes-1.0a1.tar.gz (30.1 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page