Download the PHP package derhaeuptling/contao-lazy-images without Composer

On this page you can find all versions of the php package derhaeuptling/contao-lazy-images. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package contao-lazy-images

No Maintenance Intended

DEPRECATED

This plugin was made to do two things:

  1. lazy load images
  2. prevent browser reflow whenever image dimensions become available

Both are now becoming solved by native browser support ... at least partially for now.

  1. native lazy loading

    The loading attribute <img loading="lazy"> brings native lazy loading to the browser.
    As of writing this, it is supported by Google Chrome & Microsoft Edge.
    more info:
    caniuse.com
    Firefox has plans for v75
    Safari is working on it too

  2. native image placeholder

    Img with and height attributes still work perfectly to paint a placeholder into which the image will be loaded.
    But whenever we added responsive css to our images, like by adding style="width: 100%; height: auto;", the browser where unable to paint the placeholder.

    But in the meantime, beginning with Firefox, the broswers now utilize the with and height img attributes to calculate an aspect ratio. With this aspect ratio modern browsers can now paint a placeholder.
    (actually this is the same, what this plugin does and the intrinsic ratio trick did back in 2009.)

    Source: https://www.youtube.com/watch?v=4-d_SoCHeWE

Thanks for having used this Plugin!

contao-lazy-images

Contao Plugin for lazyloading images with LazySizes.js without the disturbing reflow of the website, whenever an image is loaded.

Lazyloading images improves the website performance. Images no longer block the window.onload event.
Visible images in the viewport are loaded first and therefore faster.

To prevent the website reflow whenever an image is loaded a the configurable placeholder protects the place the image would take.

Several options are available in the generic contao settings:

The sizes of the placeholders and thumbnails can be adjusted.

Hint:the picture syntax with its sources is supported since 3.0.0, but only work with thumbails, not with instrinsic ratios.

Why preventing the reflow

While the reflow is ugly and consumes computing power it also causes issues with JavaScript layout solutions.

JavaScript libs like Masonry or GreenSock position / layout elements respectively their dimensions.
If anything is changing those dimensions afterwards, like an image that got (lazy)loaded, the calculated layout breaks.

Using inline placeholders prevent those issues upfront.

LazySizes

LazySizes is a high performance and SEO friendly lazy loader for images (responsive and normal), iframes and more, that detects any visibility changes triggered through user interaction, CSS or JavaScript without configuration.


All versions of contao-lazy-images with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
contao/core-bundle Version ~4.4.0 || <4.8
contao-community-alliance/composer-plugin Version ~2.4 || ~3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package derhaeuptling/contao-lazy-images contains the following files

Loading the files please wait ....