
We need to edit the extra section in composer.json to include the following:.Then we need to run the command (we add the -W option at the end if necessary):Ĭomposer require drupal/lazy:^3.0 bower-asset/lazysizes:^5.1 oomphinc/composer-installers-extender:^2.0 -no-update.In the repositories section, we add the following:.

#Drupal latest version download full
In a few steps, we can perform a full installation of the module, including dependencies. The easiest and fastest way is to use the composer.json file for this. The module uses additional libraries, so the installation requires taking them into account. While the example is grotesque (we are unlikely to encounter a website with such a large number of images or embedded elements), it’s meant to illustrate how important the use of a lazy loading strategy can be in the perception of a website. Of course, the results for each website will strongly depend on the size and number of elements outside the loading area. Moreover, the link savings is more than 98%. In the above example, the user is able to see the website almost fifty percent faster when using the module. To illustrate the effectiveness of the Lazy-load module, here are the test results on a website containing 36 iframes (of which 6 are visible in the loaded area) and 116 images that are out of view. It’s commendable that Osman Gormus is the sole maintainer of the project, and yet the module hasn’t lost support since its creation. It has versions for both Drupal 8+ (the latest version 8.x-3.11 as of January 31, 2022) and Drupal 7 (the latest version 7.x-1.4 as of April 22, 2019).

Due to its usefulness, the module is used by more than 10 thousand websites. This reduces the website loading time and, above all, reduces the consumption of transmission. Released on April 10, 2018, the Drupal Lazy-load module allows you to limit the loading of the abovementioned elements to only those required at a given time. In such cases, it’s worth checking whether lazy loading can be used to reduce the loading time of the website and the transfer needed to load visible elements. Most often, these are websites that have been developed for years, and therefore often have a lot of data (including media and embedded elements), the long loading of which worsens the perception of the portal. However, you have to reckon with the fact that many websites use older versions of Drupal. Newer versions of Drupal (v9.1.0 and above), along with commonly used browsers (Chrome from v76, Firefox from v75), support lazy-loading right after installation. Loading the website on Drupal - Lazy-load module Both metrics are largely influenced by the number and size of loaded items. TBT indicates the time it takes for long tasks to complete, while LCP determines after how long a website's content is likely to be usable. Two significant metrics in terms of the website loading speed are TBT (Total Blocking Time) and LCP (Largest Contentful Paint). Therefore, it’s worth taking care of the smooth display of web pages. Google has introduced SEO guidelines in which loading speed is taken into account when positioning a website. On big websites, many elements are invisible to the users until they scroll the website, yet they are loaded before the part that fits on the display is shown. Often the media and embedded elements take the longest to load. It depends on the amount of text, embedded elements (such as iframes), scripts, and media (images, videos), where the size also matters. It’s the time required to display a website to a user, calculated from the moment the link is clicked. The easiest way to use this method in Drupal is to use the Lazy-load module. Then how can you speed up the loading of a website that has a lot of media or iframes? One of the best solutions is to take advantage of lazy loading.

The website loading speed is a very important aspect in the user's perception of the portal.
