PHPackages                             justbetter/statamic-image-optimize - 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. justbetter/statamic-image-optimize

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

justbetter/statamic-image-optimize
==================================

Image optimization after upload

5.0.0(1mo ago)1315.2k↓42.9%6[2 PRs](https://github.com/justbetter/statamic-image-optimize/pulls)MITPHPPHP ^8.4|^8.5CI passing

Since Oct 28Pushed 1mo ago4 watchersCompare

[ Source](https://github.com/justbetter/statamic-image-optimize)[ Packagist](https://packagist.org/packages/justbetter/statamic-image-optimize)[ RSS](/packages/justbetter-statamic-image-optimize/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (19)Versions (36)Used By (0)

[ ![Banner](./art/banner.png)](https://github.com/justbetter/statamic-image-optimize "JustBetter")Image Optimize
==============

[](#image-optimize)

> Image optimization after upload

How to Install
--------------

[](#how-to-install)

You can search for this addon in the `Tools > Addons` section of the Statamic control panel and click **install**, or run the following command from your project root:

```
composer require justbetter/statamic-image-optimize
```

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

[](#requirements)

The addon makes use of **Laravel Batches** to optimize images. Because of this you need an active database connection that contains the `job_batches` table. You can generate this table by running the following commands:

```
php artisan queue:batches-table
php artisan migrate
```

If your queue connection is not `sync`, make sure a queue worker is running.

Config
------

[](#config)

### Publish

[](#publish)

```
php artisan vendor:publish --provider="JustBetter\ImageOptimize\ServiceProvider"
```

### Settings

[](#settings)

You can change the default resize width/height and queue settings in `config/image-optimize.php` (or via env vars like `IMAGE_OPTIMIZE_WIDTH`, `IMAGE_OPTIMIZE_HEIGHT`, `IMAGE_OPTIMIZE_QUEUE_CONNECTION`, `IMAGE_OPTIMIZE_QUEUE_NAME`).

Commands
--------

[](#commands)

```
php artisan justbetter:optimize:images
```

By running this command you can optimize images in the Statamic asset library.

### Options

[](#options)

Add the `--forceAll` option to force the command to optimize all images. Otherwise the command will only optimize images that have not been optimized yet.

You can also use the verbose option by adding `-v` to your command, this will show a progress bar containing the amount of jobs left in the batch.

Features
--------

[](#features)

- After an image is uploaded an event will trigger to optimize the image. The event optimizes the images and resizes it to a specified size, this is being controlled by the config file.
- By using the optimize images command you can optimize images in the asset library.
- Added an action in the CP Asset overview that allows you to select assets and trigger the optimize job manually.
- Added a CP page to optimize remaining images or force-optimize all images, showing batch progress while it runs.

###  Health Score

59

—

FairBetter than 99% of packages

Maintenance90

Actively maintained with recent releases

Popularity36

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 83.3% 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 ~49 days

Recently: every ~150 days

Total

26

Last Release

52d ago

Major Versions

1.3.3 → 2.0.02023-06-22

2.1.2 → 3.0.02024-06-21

3.2.0 → 4.0.02025-05-20

4.0.0 → 5.0.02026-03-27

PHP version history (5 changes)1.0.0PHP ^8.1

1.0.1PHP ^8.0

3.2.0PHP ^8.1|^8.2|^8.3

4.0.0PHP ^8.2|^8.3

5.0.0PHP ^8.4|^8.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/2d00b3f55cd4ae8b8cfb001a644ed6c7a1127a956c24375bcfe16ce12bd89bed?d=identicon)[justbetter](/maintainers/justbetter)

---

Top Contributors

[![kevinmeijer97](https://avatars.githubusercontent.com/u/9716909?v=4)](https://github.com/kevinmeijer97 "kevinmeijer97 (30 commits)")[![danielsmink](https://avatars.githubusercontent.com/u/2118314?v=4)](https://github.com/danielsmink "danielsmink (2 commits)")[![BobWez98](https://avatars.githubusercontent.com/u/23509926?v=4)](https://github.com/BobWez98 "BobWez98 (1 commits)")[![fritsjustbetter](https://avatars.githubusercontent.com/u/110908371?v=4)](https://github.com/fritsjustbetter "fritsjustbetter (1 commits)")[![physixc](https://avatars.githubusercontent.com/u/24213136?v=4)](https://github.com/physixc "physixc (1 commits)")[![stuartcusackie](https://avatars.githubusercontent.com/u/20210934?v=4)](https://github.com/stuartcusackie "stuartcusackie (1 commits)")

---

Tags

justbetterasset-uploads

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/justbetter-statamic-image-optimize/health.svg)

```
[![Health](https://phpackages.com/badges/justbetter-statamic-image-optimize/health.svg)](https://phpackages.com/packages/justbetter-statamic-image-optimize)
```

###  Alternatives

[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)[daun/statamic-placeholders

Generate low-quality image placeholders for lazyloading Statamic assets

106.6k](/packages/daun-statamic-placeholders)[daun/statamic-mux

Seamless video encoding and streaming using Mux on Statamic sites

132.3k](/packages/daun-statamic-mux)

PHPackages © 2026

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