PHPackages                             cmouleyre/next-gen-picture - 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. cmouleyre/next-gen-picture

ActiveLibrary[Image &amp; Media](/categories/media)

cmouleyre/next-gen-picture
==========================

Generate your images in WebP format in different sizes plus the appropriate HTML tag. Manage: media requests, device pixel ratio and 100% compatibility.

1.0.11(9mo ago)138MITPHPPHP &gt;=7

Since Apr 16Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/MrManchot/NextGenPicture)[ Packagist](https://packagist.org/packages/cmouleyre/next-gen-picture)[ RSS](/packages/cmouleyre-next-gen-picture/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)DependenciesVersions (13)Used By (0)

NextGenPicture
==============

[](#nextgenpicture)

Generate your images in [WebP](https://developers.google.com/speed/webp) format in different sizes plus the appropriate HTML tag.

Manage: media requests, device pixel ratio and 100% compatibility.

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

[](#installation)

For your server (command for Ubuntu) :

```
sudo apt install imagemagick webp
```

Optional :

```
sudo apt install jpegoptim pngquant
```

Install NextGenPicture with composer :

```
composer require cmouleyre/next-gen-picture
```

Usage
-----

[](#usage)

```
  $ngp = new NextGenPicture([
    'relative_path' => '../cache/',
    'cache_dir' => __DIR__ . '/../cache/',
    'force_generate' => false,
    'compatibility' => true,
    'quality' => 90,
    'max_pixel_ratio' => 3
  ]);

  $html = $ngp->load('sample.jpg')
    ->setMaxDisplaySize([800, 600])
    ->setResponsive([1024 => 375])
    ->setAlt('Alt of the picture')
    ->setId('picture-id')
    ->setClass(['picture-first-class', 'picture-second-class'])
    ->setAttributes(['data-first' => 'toto', 'data-second' => 'tata'])
    ->display();
```

Result :

```

```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance57

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

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

Recently: every ~365 days

Total

12

Last Release

287d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/31999b3179ed3f97c652767c97b1706586dd798caa4d12acd49ce429542df707?d=identicon)[MrManchot](/maintainers/MrManchot)

---

Top Contributors

[![MrManchot](https://avatars.githubusercontent.com/u/2027380?v=4)](https://github.com/MrManchot "MrManchot (23 commits)")

---

Tags

phpimagepictureoptimizerWebppixel-ratio

### Embed Badge

![Health badge](/badges/cmouleyre-next-gen-picture/health.svg)

```
[![Health](https://phpackages.com/badges/cmouleyre-next-gen-picture/health.svg)](https://phpackages.com/packages/cmouleyre-next-gen-picture)
```

###  Alternatives

[dantsu/php-image-editor

PHP library to easily edit image with GD extension.

34152.1k2](/packages/dantsu-php-image-editor)[lciolecki/php-image-optimizer

PHP image file optimizer (uses https://github.com/bensquire/php-image-optim)

347.4k](/packages/lciolecki-php-image-optimizer)[toinekamps/responsive-pics

Responsive Pics is a Wordpress tool for resizing images on the fly.

831.2k](/packages/toinekamps-responsive-pics)[gtuk/image-optimizer

PHP image optimizer for png, jpeg and gif files. It uses mozjpeg, pngquant and gifsicle for the optimization process

161.6k](/packages/gtuk-image-optimizer)[somehow-digital/typo3-media-processing

Media Processing

101.1k](/packages/somehow-digital-typo3-media-processing)

PHPackages © 2026

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