PHPackages                             nirvana-msu/yii2-iframe-resizer - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. nirvana-msu/yii2-iframe-resizer

AbandonedArchivedYii2-extension[Utility &amp; Helpers](/categories/utility)

nirvana-msu/yii2-iframe-resizer
===============================

Yii2 extension for javascript-based iFrame Resizer

81.9k4PHP

Since Nov 15Pushed 10y ago2 watchersCompare

[ Source](https://github.com/nirvana-msu/yii2-iframe-resizer)[ Packagist](https://packagist.org/packages/nirvana-msu/yii2-iframe-resizer)[ RSS](/packages/nirvana-msu-yii2-iframe-resizer/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

yii2-iframe-resizer
===================

[](#yii2-iframe-resizer)

Yii2 extension for javascript-based [iframe-resizer](https://github.com/davidjbradshaw/iframe-resizer). It enables automatic resizing of height and width of both same and cross domain iFrames to fit their contained content, provided that you have control of pages both serving and hosting iFrames.

Resources
---------

[](#resources)

- Yii2 [extension page](http://www.yiiframework.com/extension/yii2-iframe-resizer)
- iFrame Resizer library [documentation](https://github.com/davidjbradshaw/iframe-resizer)

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

[](#installation)

### Composer

[](#composer)

Add extension to your `composer.json` and update your dependencies as usual, e.g. by running `composer update`

```
{
    "require": {
        "nirvana-msu/yii2-iframe-resizer": "1.0.*@dev"
    }
}
```

\##Sample Usage

\###Page Serving iFrame You need to embed one of the library scripts into the iFrame. Extension provides two shortcuts for doing this, depending on your use-case.

- If the rendered page itself is served as an iFrame content, simply register `IFrameResizer` widget in your view:

```
IFrameResizer::widget();
```

- If you need to embed the script into existing iFrame HTML code generated elsewhere, there is a convinient shortcut you can use to inject the script before closing `` tag:

```
$injectedHtml = IFrameResizer::embed($html);
```

\###Page Hosting iFrame First, register `IFrameResizerAsset` bundle:

```
IFrameResizerAsset::register($this);
```

Finally, call the library to enable dynamic resizing. As described in the [documentation](http://davidjbradshaw.github.io/iframe-resizer/), you can do this by either using **native** JavaScript:

```
var iframes = iFrameResize( [{options}], [css selector] || [iframe] );
```

or via **jQuery**:

```
$('iframe').iFrameResize( [{options}] );
```

Note that **jQuery** is not specified as a dependency for this extension, since you may choose to use **native** version instead. Therefore if you want to use **jQuery**, make sure it is registered in your view.

\##License

Extension is released under MIT license, same as underlying iFrame Resizer library.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a1a5dd972c2dcc6866be80df680b326649a14e85dd1586af5a8fbf46e9471d0c?d=identicon)[nirvana-msu](/maintainers/nirvana-msu)

---

Top Contributors

[![nirvana-msu](https://avatars.githubusercontent.com/u/5787387?v=4)](https://github.com/nirvana-msu "nirvana-msu (5 commits)")

### Embed Badge

![Health badge](/badges/nirvana-msu-yii2-iframe-resizer/health.svg)

```
[![Health](https://phpackages.com/badges/nirvana-msu-yii2-iframe-resizer/health.svg)](https://phpackages.com/packages/nirvana-msu-yii2-iframe-resizer)
```

###  Alternatives

[ralouphie/getallheaders

A polyfill for getallheaders.

3.8k872.8M87](/packages/ralouphie-getallheaders)[cmixin/business-day

Carbon mixin to handle business days

3944.8M8](/packages/cmixin-business-day)[kzykhys/php-csv-parser

Convert CSV to array (Excel style is fully suppoted!)

57264.0k5](/packages/kzykhys-php-csv-parser)[conquer/codemirror

Yii2 codemirror widget

36281.5k3](/packages/conquer-codemirror)

PHPackages © 2026

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