PHPackages                             raoul2000/yii2-backstretch-widget - 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. raoul2000/yii2-backstretch-widget

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

raoul2000/yii2-backstretch-widget
=================================

Wrapper around the Backstretch JQuery plugin

1.0.1(11y ago)24.1kBSD-3-ClauseHTML

Since Oct 28Pushed 11y ago3 watchersCompare

[ Source](https://github.com/raoul2000/yii2-backstretch-widget)[ Packagist](https://packagist.org/packages/raoul2000/yii2-backstretch-widget)[ RSS](/packages/raoul2000-yii2-backstretch-widget/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Backstretch Yii2 Extension
==========================

[](#backstretch-yii2-extension)

This yii2 extension is a wrapper around the [jQuery Backstretch Plugin](http://srobbin.com/jquery-plugins/backstretch/).

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist raoul2000/yii2-backstretch-widget "*"

```

or add

```
"raoul2000/yii2-backstretch-widget": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code like for instance in the examples below.

**Start a slideshow on the background of element #elementId**.

Note that the images are defined as local or remote. The second argument of *pluginOptions* contains the plugin initialization settings that can be redefined if the default ones are not what you want.

```
	raoul2000\widget\backstretch\Backstretch::widget([
		'selector' => '#elementId',
		'pluginOptions' => [
			[
				'path/to/image1.jpg',
				'http://hostname1/path/to/image2.jpg',
				'http://hostname2/path/to/image3.jpg'
			],
			[
				'duration' => 3000,
				'fade' => 'slow',
				'centeredX' => true,
				'centeredY' => true
			]
		]
	]);
```

**To attach Backstretch as the body's background**

In its simplest form, attach an image to the background of the body element. Default settings are used to initialize the plugin.

```
	raoul2000\widget\backstretch\Backstretch::widget([
		'pluginOptions' => 'path/to/image1.jpg'
	]);
```

For complete documentation please refer to the [jquery-backstretch Github page](https://github.com/srobbin/jquery-backstretch)

**If this plugin did not convinced you, have a look to the [Background Switcher Plugin](https://github.com/raoul2000/yii2-bgswitcher-widget)**

License
-------

[](#license)

**yii2-backstretch-widget** is released under the BSD 3-Clause License. See the bundled `LICENSE.md` for details.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

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 ~0 days

Total

2

Last Release

4260d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ec7e087ebb28d42d781766dce67eb6d8911a11a5e3dd7e793800f506d17f0a00?d=identicon)[raoul2000](/maintainers/raoul2000)

---

Top Contributors

[![raoul2000](https://avatars.githubusercontent.com/u/1474310?v=4)](https://github.com/raoul2000 "raoul2000 (6 commits)")

---

Tags

imageyii2extensionbackgroundslider

### Embed Badge

![Health badge](/badges/raoul2000-yii2-backstretch-widget/health.svg)

```
[![Health](https://phpackages.com/badges/raoul2000-yii2-backstretch-widget/health.svg)](https://phpackages.com/packages/raoul2000-yii2-backstretch-widget)
```

###  Alternatives

[yurkinx/yii2-image

Yii2 extension for image manipulating using Kohana Image Library.

64423.2k9](/packages/yurkinx-yii2-image)[raoul2000/yii2-jcrop-widget

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

10262.8k2](/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)
