# magefan/module-lazyload

> Images lazyloading on Magento 2 store.

`composer require magefan/module-lazyload`

Canonical URL: https://packagento.com/magefan/module-lazyload

## At a glance

- **Vendor**: magefan (https://packagento.com/magefan.md)
- **Latest version**: 2.2.0 — released 2026-05-07
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/magefan/module-lazyload and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require magefan/module-lazyload:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Images lazyloading on Magento 2 store.

## README

[![Total Downloads](https://poser.pugx.org/magefan/module-lazyload/downloads)](https://packagist.org/packages/magefan/module-lazyload)
[![Latest Stable Version](https://poser.pugx.org/magefan/module-lazyload/v/stable)](https://packagist.org/packages/magefan/module-lazyload)

<a href="https://savelife.in.ua/en/donate-en/#donate-army-card-monthly"><img width="830" height="208" src="https://cm.magefan.com/blog/support-ukraine.png"></a>

<img width="150" height="100" src="https://magefan.com/media/wysiwyg/made_in_ukraine.jpg">


### Features
  * Allow to load images on your store only when customer can see them. Module reduces page size and number of request.

<a href="https://magefan.com/magento-2-image-lazy-load-extension"><img width="190" height="70" src="https://cm.magefan.com/wysiwyg/products/download-magefan-extensions.png"></a>
### Useful Links
  * [User Guide](https://magefan.com/magento-2-image-lazy-load-extension/documentation)
  * [Change Log](https://magefan.com/magento-2-image-lazy-load-extension/change-log)
  * [FAQs](https://magefan.com/magento-2-image-lazy-load-extension#pattr-faq)

### Compatibility
  * [Magento 2 WebP Optimized Images Extension](https://magefan.com/magento-2-webp-optimized-images)

### Requirements
  * Magento Community Edition 2.0.x-2.4.x or Magento Enterprise Edition 2.0.x-2.4.x

### Demo

Try out our open demo and if you like our extension **please give us some star on Github ★**
<table>
  <tbody>
    <tr>
      <td align="center" valign="middle">
        Storefront Demo
      </td>
      <td align="center" valign="middle">
        Admin Panel Demo
      </td align="center" valign="middle">
    </tr>
    <tr>
      <td align="center" valign="middle">
        <a href="https://ill.demo.magefan.top/">
          <img
            src="https://magefan.com/static/version1520969775/frontend/Magefan/new/en_US/images/product-tab-demo-1.jpg"
            alt="Magento 2 Image Lazy Load Extension Storefront Demo"
            height="220"
          >
        </a>
      </td>
      <td align="center" valign="middle">
        <a href="https://ill.demo.magefan.top/admin/admin/">
          <img
            src="https://cs.magefan.com/version1732118579/frontend/Magefan/next/en_US/Magefan_CssOptimizer/images/product-tab-demo-2.jpg"
            alt="Magento 2 Image Lazy Load Extension Admin Panel Demo"
            height="220"
          >
        </a>
      </td>
    </tr>
    <tr>
      <td align="center" valign="middle">
        <a href="https://ill.demo.magefan.top/">
          view
        </a>
      </td>
      <td align="center" valign="middle">
        <a href="https://ill.demo.magefan.top/admin/admin/">
          view
        </a>
      </td>
    </tr>
  </tbody>
</table>



### Support
If you have any issues, please [contact us](mailto:support@magefan.com)
then if you still need help, open a bug report in GitHub's
[issue tracker](https://github.com/magefan/module-lazyload/issues).

Please do not use Magento Marketplace's Reviews or (especially) the Q&A for support.
There isn't a way for us to reply to reviews and the Q&A moderation is very slow.

### License
The code is licensed under [EULA](https://magefan.com/end-user-license-agreement).

### [Magento Extensions](https://magefan.com/magento-2-extensions) by Magefan

#### Magento 2 SEO Extensions

* [Magento SEO](https://magefan.com/magento-2-seo-extension)
* [Magento 2 Rich Snippets](https://magefan.com/magento-2-rich-snippets)
* [Magento 2 HTML Sitemap](https://magefan.com/magento-2-html-sitemap-extension)
* [Magento 2 XML Sitemap](https://magefan.com/magento-2-xml-sitemap-extension)
* [Magento 2 Twitter Cards](https://magefan.com/magento-2-twitter-cards-extension)
* [Magento Open Graph Tags](https://magefan.com/magento-2-open-graph-extension-og-tags)

#### [Magento 2 Google Extensions](https://magefan.com/magento-2-extensions/google-extensions)

* [Magento Google Tag Manager](https://magefan.com/magento-2-google-tag-manager)
* [Magento 2 Google Analytics 4](https://magefan.com/magento-2-google-analytics-4)
* [Magento Google Shopping Feed](https://magefan.com/magento-2-google-shopping-feed-extension)
* [Magento Google Customer Reviews](https://magefan.com/magento-2-google-customer-reviews)
* [Magento 2 Google Indexing](https://magefan.com/magento-2-google-indexing-api)

#### [Magento Speed Optimisation Extensions](https://magefan.com/magento-2-extensions/speed-optimization)

* [Magento 2 Google Page Speed Optimizer](https://magefan.com/magento-2-google-page-speed-optimizer)
* [Magento 2 WebP Images](https://magefan.com/magento-2-webp-optimized-images)
* [Magento Full Page Cache Extension](https://magefan.com/magento-2-full-page-cache-warmer)
* [Magento 2 Defer JavaScript](https://magefan.com/rocket-javascript-deferred-javascript)

#### [Magento Admin Extensions](https://magefan.com/magento-2-extensions/admin-extensions)

* [Magento 2 Dynamic Category](https://magefan.com/magento-2-dynamic-categories)
* [Magento 2 Size Chart](https://magefan.com/magento-2-size-chart)
* [Magento 2 Security Extension](https://magefan.com/magento-2-security-extension)
* [Magento 2 Admin Action Log](https://magefan.com/magento-2-admin-action-log)
* [Magento Extended Product Grid](https://magefan.com/magento-2-product-grid-inline-editor)
* [Magento 2 Product Tabs](https://magefan.com/magento-2/extensions/product-tabs)
* [Magento 2 Product Widget](https://magefan.com/magento-2-product-widget)
* [Magento 2 Email Attachments](https://magefan.com/magento-2-email-attachments)
* [Magento 2 Admin View](https://magefan.com/magento-2-admin-view-extension)
* [Magento 2 Email Notifications](https://magefan.com/magento-2-admin-email-notifications)
* [Magento 2 Login As Customer](https://magefan.com/login-as-customer-magento-2-extension)

#### [Magento Order Management Extensions](https://magefan.com/magento-2-extensions/order-management)

_(README truncated for .md surface. Full README on https://packagento.com/magefan/module-lazyload.)_

## Recent Versions

| Version | Released |
|---|---|
| 2.2.0 | 2026-05-07 |
| 2.1.7 | 2026-03-23 |
| 2.1.6 | 2025-01-22 |
| 2.1.5 | 2024-07-03 |
| 2.1.4 | 2024-02-09 |
| 2.1.3 | 2024-01-18 |
| 2.1.2 | 2023-12-18 |
| 2.1.1 | 2023-10-05 |
| 2.1.0 | 2023-09-12 |
| 2.0.23.1 | 2023-06-16 |

Showing 10 of 35 versions. Full release history on https://packagento.com/magefan/module-lazyload.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| magefan/module-community | >=2.3.5 |

### Suggest

| Package | Constraint |
|---|---|
| magefan/module-rocketjavascript | Install Rocket JavaScript to optimize JS loading. |
| magefan/module-webp | Install WebP Optimized Images to serve images in the next-gen format. Use coupon code COMPOSER-FAN to get 10% discount on magefan.com. |

## Quality

Latest release (2.2.0) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | Pass |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Fail | 31 | 4 errors, 27 warnings (ruleset: Magento2) — 4 auto-fixable with phpcbf |
| PHPMD | Warning | 6 | 6 rule violations (UnusedFormalParameter:5, IfStatementAssignment:1) |
| Cpd | Warning | 1 | 1 duplicated chunk spanning 40 total lines (min-lines=5, min-tokens=70) |
| Composer validate | Info | 3 | valid; 3 advisory notes (composer validate --strict) |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 50 | 50 | – | – |
| 2.4.8 | – | 59 | 59 | – |
| 2.4.9 | – | – | 59 | 59 |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["magefan/module-lazyload"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

magefan is a Magento 2 vendor on Packagento. See https://packagento.com/magefan.md for their full catalogue.

