PHPackages                             webkinder/sproutset - 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. [Templating &amp; Views](/categories/templating)
4. /
5. webkinder/sproutset

ActiveLibrary[Templating &amp; Views](/categories/templating)

webkinder/sproutset
===================

Modern responsive image management for projects using the Roots Acorn framework.

v1.0.0-rc.2(2w ago)282.7k↓45.2%[1 issues](https://github.com/webkinder/sproutset/issues)[2 PRs](https://github.com/webkinder/sproutset/pulls)GPL-3.0-or-laterPHPPHP ^8.4CI passing

Since May 9Pushed 1mo agoCompare

[ Source](https://github.com/webkinder/sproutset)[ Packagist](https://packagist.org/packages/webkinder/sproutset)[ Docs](https://github.com/webkinder/sproutset)[ RSS](/packages/webkinder-sproutset/feed)WikiDiscussions develop Synced 2w ago

READMEChangelog (10)Dependencies (33)Versions (31)Used By (0)

Sproutset
=========

[](#sproutset)

Modern responsive image management for projects using the Roots Acorn framework.

Requirements
------------

[](#requirements)

- PHP ^8.4
- WordPress 6.7+
- Roots Acorn ^6.2

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

[](#installation)

Install via Composer:

```
composer require webkinder/sproutset
```

Acorn auto-discovers the service provider (declared under `extra.acorn.providers`), so no manual registration is needed. To customize the defaults, publish the config file:

```
wp acorn vendor:publish --tag=sproutset-config
```

This writes `config/sproutset.php`, read throughout via `config('sproutset.*')`.

Configuration
-------------

[](#configuration)

`config/sproutset.php` has three blocks.

### Image sizes

[](#image-sizes)

`image_sizes` is the complete roster Sproutset registers with WordPress on every request. Each size takes:

- `width` — target width in pixels.
- `height` — target height in pixels (`0` = proportional).
- `crop` — `true` for a hard crop, `false` to scale within the box.
- `srcset` — optional list of multipliers; each adds an `@Nx` variant (e.g. `large@2x`).

The package ships `thumbnail`, `medium`, `medium_large`, and `large`. The four WordPress core sizes are driven from this config, and their fields are locked on **Settings → Media** so they can't drift.

```
'image_sizes' => [
    'large' => [
        'width' => 1024,
        'height' => 1024,
        'crop' => false,
        'srcset' => [0.5, 2],
    ],
],
```

### AVIF

[](#avif)

`avif` opts into AVIF delivery for images rendered through the component. Disabled is a guaranteed no-op.

```
'avif' => [
    'enabled' => false, // opt-in
    'quality' => 50,    // 0–100
],
```

### Focal point

[](#focal-point)

`focal_point` (default `true`) enables per-image focal points set in the Media Library. Set it to `false` to disable the picker, metadata honoring, and cropping.

```
'focal_point' => true,
```

Usage
-----

[](#usage)

Render an attachment with the `` Blade component:

```

```

If the attachment can't be resolved, the component renders nothing.

### Attributes

[](#attributes)

AttributeDefaultNotes`attachment-id``0`Attachment ID (int or numeric string).`size-name``large`A registered size name.`sizes``null`Explicit `sizes` attribute; overrides auto sizes.`alt``null`Alt text.`width` / `height``null`Override the rendered box.`class``null`Merged with the element's classes.`loading``lazy``lazy` or `eager`.`decoding``async``async`, `sync`, or `auto`.`use-auto-sizes``true`Resolve `sizes="auto"` for lazy images when no explicit `sizes` is given.`focal-point``false`Enable per-call focal positioning.`focal-point-x` / `focal-point-y``null`Focal coordinates, `0`–`100`.Any other attribute (`id`, `data-*`, `aria-*`, `title`, …) passes through onto the ``.

When `use-auto-sizes` is on and no explicit `sizes` is set, lazy-loaded images resolve `sizes="auto"`; eager images omit it (`sizes="auto"` is only valid for lazy images).

AVIF
----

[](#avif-1)

With `avif.enabled` set, Sproutset layers an AVIF `` over the original `` inside a ``:

```

```

It is additive — the original `` is always the fallback — and never touches WordPress's global image pipeline, so favicons, `og:image`, and admin thumbnails are unaffected. The one CSS caveat: a direct-child selector like `.gallery > img` becomes `.gallery > picture > img`.

Focal point
-----------

[](#focal-point-1)

Set a focal point once per image in the Media Library and it is honored everywhere `` renders it — hard-crop sizes are re-cropped around the point, and cover contexts get `object-position`. A center (50/50) point is a no-op. Override a single placement with the component's attributes:

```

```

Contributing
------------

[](#contributing)

Contributions are welcome. Please read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a pull request.

License
-------

[](#license)

Sproutset is open-source software licensed under the [GNU General Public License v3.0](LICENSE).

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance92

Actively maintained with recent releases

Popularity31

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 59.6% 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 ~30 days

Recently: every ~35 days

Total

16

Last Release

18d ago

Major Versions

v0.1.0-beta.11 → v1.0.0-rc.12026-07-30

PHP version history (3 changes)v0.1.0-beta.1PHP ^8.2

v0.1.0-beta.11PHP ^8.3

v1.0.0-rc.1PHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/597462d46107dd3eedd2b10f3add8a737c67c8148836713dd97585128d19d477?d=identicon)[webkinder](/maintainers/webkinder)

---

Top Contributors

[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (171 commits)")[![marcoluzi](https://avatars.githubusercontent.com/u/40238681?v=4)](https://github.com/marcoluzi "marcoluzi (115 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

acornbladecomposerlaravelresponsive-imagewordpress-laravelwordpress-pluginwordpressbladerootsResponsive Imagesimage-optimizationacorn

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/webkinder-sproutset/health.svg)

```
[![Health](https://phpackages.com/badges/webkinder-sproutset/health.svg)](https://phpackages.com/packages/webkinder-sproutset)
```

###  Alternatives

[spatie/laravel-medialibrary

Associate files with Eloquent models

6.2k45.4M704](/packages/spatie-laravel-medialibrary)[log1x/sage-directives

A set of Blade directives for use with Roots Sage.

298764.2k11](/packages/log1x-sage-directives)[finller/laravel-media

A flexible media library for Laravel

472.1k](/packages/finller-laravel-media)[statikbe/laravel-filament-flexible-content-blocks

The Laravel Filament Flexible Content Blocks package helps you to easily create content in Filament for any model, with predefined or custom blocks, and foreach block an extendable Blade view component.

17927.9k6](/packages/statikbe-laravel-filament-flexible-content-blocks)[log1x/blade-svg-sage

Composer package to add support for Blade SVG by Adam Wathan to Roots Sage.

7578.7k](/packages/log1x-blade-svg-sage)[elegantly/laravel-media

A flexible media library for Laravel

476.6k4](/packages/elegantly-laravel-media)

PHPackages © 2026

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