PHPackages                             johntout/laravel-image-sizes - 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. johntout/laravel-image-sizes

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

johntout/laravel-image-sizes
============================

Laravel Image Sizes Package

1.4.2(1y ago)01.6kMITPHPPHP &gt;=8.0

Since Dec 1Pushed 1y ago1 watchersCompare

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

READMEChangelog (10)Dependencies (2)Versions (25)Used By (0)

Laravel Image Sizes
===================

[](#laravel-image-sizes)

A Laravel package to store images in different sizes. There are also options for various video provider urls.

This package was created for a personal project and I publish it in case anyone has the same needs. Cheers :)

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

[](#requirements)

```
PHP 8+
Laravel 9+

```

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

[](#installation)

### Step 1: Install johntout/laravel-image-sizes with composer:

[](#step-1-install-johntoutlaravel-image-sizes-with-composer)

```
composer require johntout/laravel-image-sizes

```

The package is using intervention/image package for image manipulation. Before using laravel-image-sizes package, make sure to checkout the [intervention/image docs](https://image.intervention.io/v2/introduction/installation) for laravel integration.

### Step 2: Publish config file

[](#step-2-publish-config-file)

```
php artisan vendor:publish --tag="laravel-image-sizes-config"

```

If you want to use Twitch video provider to embed player to your app, add this to your .env file.

```
APP_DOMAIN=yourdomain.com

```

Usage
-----

[](#usage)

Use properties or Laravel Attributes to set in which disk and directory you want to create the images. The package uses Laravel's filesystem. The different sizes of the images are defined in the config file.

```
class User extends Model
{
    use JohnTout\LaravelImageSizes\HasMedia;

    public string filesystem_disk = 'avatars';

    public string image_field = 'avatar';

    // OR

    /**
     * @return Attribute
     */
    public function filesystemDisk(): Attribute
    {
        return Attribute::make(
            get: fn () => 'avatars'
        );
    }

    /**
     * @return Attribute
     */
    public function imageField(): Attribute
    {
        return Attribute::make(
            get: fn () => 'avatar'
        );
    }
}
```

```
$user = User::query()->find(1);
$user->saveImage($request->file('image'));
```

You can get the image url using this:

```
$user->imageUrl(size: 'originalImage');
```

Notes
-----

[](#notes)

The package is using v2 intervention/image package. For more information about image manipulation options, see [intervention/image docs](https://image.intervention.io/v2).

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

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

Recently: every ~13 days

Total

24

Last Release

649d ago

PHP version history (2 changes)v1.0.0PHP ^8.0

v1.3.2PHP &gt;=8.0

### Community

Maintainers

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

---

Top Contributors

[![johntout](https://avatars.githubusercontent.com/u/8047160?v=4)](https://github.com/johntout "johntout (37 commits)")

---

Tags

laravel

### Embed Badge

![Health badge](/badges/johntout-laravel-image-sizes/health.svg)

```
[![Health](https://phpackages.com/badges/johntout-laravel-image-sizes/health.svg)](https://phpackages.com/packages/johntout-laravel-image-sizes)
```

###  Alternatives

[ace-of-aces/laravel-image-transform-url

Easy, URL-based image transformations inspired by Cloudflare Images.

1756.4k](/packages/ace-of-aces-laravel-image-transform-url)[mostafaznv/nova-video

Video Field for Laravel Nova

22398.0k1](/packages/mostafaznv-nova-video)

PHPackages © 2026

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