PHPackages                             stew/image-uploader - 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. stew/image-uploader

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

stew/image-uploader
===================

Image uploads using Laravel Storage and conversion to format .webp

v1.0.5(2y ago)019MITPHP

Since Oct 19Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ninhnk/image-uploader)[ Packagist](https://packagist.org/packages/stew/image-uploader)[ RSS](/packages/stew-image-uploader/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (8)Used By (0)

Usage Instructions for Image Uploader
=====================================

[](#usage-instructions-for-image-uploader)

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

[](#installation)

```
composer require stew/image-uploader

```

Usage
-----

[](#usage)

- Step 1: Import the UploaderTrait

```
use Stew\ImageUploader\Traits\UploaderTrait;

```

- Step 2: Implement the Trait in Your Class/Controller

```
use Stew\ImageUploader\Traits\UploaderTrait;

class YourController extends Controller
{
    use UploaderTrait;

    public function uploadImage(Request $request)
    {
        // code
    }
}

```

Utilize the Provided Methods
----------------------------

[](#utilize-the-provided-methods)

#### Get Image Disk

[](#get-image-disk)

- The getImageDisk() method retrieves the name of the image storage disk. By default, it reads the FILESYSTEM\_DISK environment variable. You can specify a different disk by setting the FILESYSTEM\_DISK variable in your environment configuration.

```
$this->getImageDisk();

```

- Make sure that your `.env` file and config `filesystems.default` has the FILESYSTEM\_DISK variable, for example:

```
FILESYSTEM_DISK=local

```

```
'default' => env('FILESYSTEM_DISK', 'local'),

```

- To use the database for storing configuration, you need to run a migration with the following command:

```
php artisan migrate

```

- The above command will create a "settings" table with the following structure:

```
Schema::create('settings', function (Blueprint $table) {
    $table->id();
    $table->string('key')->unique();
    $table->text('value');
    $table->timestamps();
});

```

- We have provided sample data for you to test. You can seed the sample data with the following command.

```
php artisan db:seed --class=Stew\\ImageUploader\\Database\\Seeders\\SettingSeeder

```

- To use configuration from the "settings" table (by default), you can use the following function:

```
$this->getImageDisk('YOUR TABLE') // Default is "settings"

```

- If you want to customize the seeded data, you can use the following command:

```
php artisan vendor:publish --provider="Stew\ImageUploader\Providers\ImageUploaderServiceProvider"

```

#### Get Storage Directory

[](#get-storage-directory)

- To obtain the storage directory for images, use the getDirectory($path) method.

```
$this->getDirectory($path);

```

#### Save Image File to Storage

[](#save-image-file-to-storage)

- This method is used to save an image file to your storage. It returns a string representing the path to the saved image with a .webp extension.

```
$this->saveFileToStorage($fileName, $path);

```

#### Check for Base64 String

[](#check-for-base64-string)

- To check if a string is a base64 string, use the isBase64($strEndcode) method.

```
$this->isBase64($strEndcode);

```

#### Delete Image

[](#delete-image)

- To delete an image file from storage, utilize the deleteImage($filePath) method.

```
$this->deleteImage($filePath);

```

The Public Disk
---------------

[](#the-public-disk)

- To create the symbolic link, you may use the storage:link Artisan command:

```
php artisan storage:link

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

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

Total

6

Last Release

936d ago

### Community

Maintainers

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

### Embed Badge

![Health badge](/badges/stew-image-uploader/health.svg)

```
[![Health](https://phpackages.com/badges/stew-image-uploader/health.svg)](https://phpackages.com/packages/stew-image-uploader)
```

###  Alternatives

[milon/barcode

Barcode generator like Qr Code, PDF417, C39, C39+, C39E, C39E+, C93, S25, S25+, I25, I25+, C128, C128A, C128B, C128C, 2-Digits UPC-Based Extention, 5-Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI (Variation of Plessey code)

1.5k13.3M39](/packages/milon-barcode)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[goat1000/svggraph

Generates SVG graphs

132849.6k3](/packages/goat1000-svggraph)[cohensive/embed

Media Embed (for Laravel or as a standalone).

120370.4k](/packages/cohensive-embed)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

63991.3k4](/packages/netresearch-rte-ckeditor-image)[humanmade/tachyon-plugin

Rewrites WordPress image URLs to use Tachyon

87338.5k2](/packages/humanmade-tachyon-plugin)

PHPackages © 2026

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