PHPackages                             davidhirtz/yii2-lazysizes - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. davidhirtz/yii2-lazysizes

ActiveYii2-extension[Image &amp; Media](/categories/media)

davidhirtz/yii2-lazysizes
=========================

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.

v2.3.0(3y ago)51.5k1MITPHP

Since Jul 26Pushed 3y ago2 watchersCompare

[ Source](https://github.com/davidhirtz/yii2-lazysizes)[ Packagist](https://packagist.org/packages/davidhirtz/yii2-lazysizes)[ RSS](/packages/davidhirtz-yii2-lazysizes/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (2)Versions (7)Used By (0)

yii2-lazysizes extension
========================

[](#yii2-lazysizes-extension)

[lazysizes](https://github.com/aFarkas/lazysizes) is a fast (jank-free), SEO-friendly and self-initializing lazyloader for images (including responsive images picture/srcset), iframes, scripts/widgets and much more.

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

```
php composer.phar require --prefer-dist davidhirtz/yii2-lazysizes "*"
```

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your views. The following example shows you how to add an lazysizes powered image tag.

```
\davidhirtz\yii2\lazysizes\AssetBundle::register($this);
echo \davidhirtz\yii2\lazysizes\Html::lazyImg($srcset, $options);
```

Upgrade from V1
---------------

[](#upgrade-from-v1)

Important: `AssetBundle` is no longer registered by calling `Html::lazyImg()`.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~304 days

Recently: every ~270 days

Total

6

Last Release

1376d ago

Major Versions

v1.2 → v2.02019-10-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/4266eaf8539e1f155d297647f285c2c2ddd1f3d73f279230acb0fdec9da05af1?d=identicon)[davidhirtz](/maintainers/davidhirtz)

---

Top Contributors

[![davidhirtz](https://avatars.githubusercontent.com/u/973624?v=4)](https://github.com/davidhirtz "davidhirtz (22 commits)")

---

Tags

yii2extensionlazysizes

### Embed Badge

![Health badge](/badges/davidhirtz-yii2-lazysizes/health.svg)

```
[![Health](https://phpackages.com/badges/davidhirtz-yii2-lazysizes/health.svg)](https://phpackages.com/packages/davidhirtz-yii2-lazysizes)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[trntv/yii2-glide

Yii2 Glide Extension

41273.6k9](/packages/trntv-yii2-glide)[raoul2000/yii2-jcrop-widget

This extension is a wrapper for the jQuery Image Cropping Plugin (jcrop)

11270.3k2](/packages/raoul2000-yii2-jcrop-widget)[noam148/yii2-image-resize

A Yii2 component for resizing images (on the fly)

1044.9k7](/packages/noam148-yii2-image-resize)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
