PHPackages                             mindshaker/image-upload - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. mindshaker/image-upload

ActiveLibrary[File &amp; Storage](/categories/file-storage)

mindshaker/image-upload
=======================

Laravel Image Upload

1.2.4(1y ago)0105Apache-2.0PHPPHP ^7.2|^8.0

Since Feb 28Pushed 1y ago3 watchersCompare

[ Source](https://github.com/MindShaker/laravel-pkg-imageupload)[ Packagist](https://packagist.org/packages/mindshaker/image-upload)[ RSS](/packages/mindshaker-image-upload/feed)WikiDiscussions main Synced yesterday

READMEChangelog (8)Dependencies (3)Versions (9)Used By (0)

Laravel Image Upload
====================

[](#laravel-image-upload)

This package makes image upload easy. It uses [Intervention Image](https://image.intervention.io/v3) under the hood.

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

[](#installation)

Require this package, with [Composer](https://getcomposer.org), in the root directory of your project.

```
$ composer require mindshaker/image-upload
```

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

[](#configuration)

There are some default configurations

```
return [
    'public_path' => 'uploads',
    'random_name' => true,
];
```

You can change this values by publishing this configuration file

```
$ php artisan vendor:publish --provider="Mindshaker\\ImageUpload\\ImageUploadServiceProvider"
```

If you want to make your images private (blocked by auth for example), you'll need to add a new disk in `config/filesystems.php` and put this in the disks array

```
'private' => [
    'driver' => 'local',
    'root' => storage_path('app/upload_folder'),
    'url' => env('APP_URL') . '/storage',
    'visibility' => 'private',
    'throw' => false,
],
```

Usage
-----

[](#usage)

There are only a few methods, you can call the `upload` method to upload a image that will be edited to the given dimensions or cropped. The image will be saved to the public\_path set in the configurations and be given a random name or the name of the original file.

The upload function returns the image name with additional path if set (see bellow)

```
use Mindshaker\ImageUpload\Facades\ImageUpload;

ImageUpload::upload($image, $width = null, $height = null, $crop = false, $private = false);
```

To add an additional path

```
ImageUpload::path("additional_path");
```

To give specific name to the uploaded file, if set it will ignore the configuration `random_name`

```
ImageUpload::name("image_name");
```

To define the format of the image uploaded (e.g. png, jpg, webp, etc..)

```
ImageUpload::format("jpg");
```

To define the quality of the image, default 75.

```
ImageUpload::quality(75);
```

You can delete images by calling the method `delete($image, $private = false)` where `$image` is the name returned from the `upload()` method

```
$image_name = ImageUpload::upload($image, 1920);

ImageUpload::delete($image_name);
```

### Basic Examples

[](#basic-examples)

```
use Mindshaker\ImageUpload\Facades\ImageUpload;

$image = $request->file('image');

//Simple upload ($width or $height needs to be specified)
//It will resize the image to 1920px. It won't upscale
ImageUpload::upload($image, 1920);

//Crop the image to the given dimensions
ImageUpload::upload($image, 512, 512, true);

//Change the format of the image
ImageUpload::format("webp")->upload($image, 1920);

//Add aditional path and change name
ImageUpload::path("posts/{id}")->name("post_name")->format("webp")->upload($image, 1920, null);
//returns something like "posts/1/post_name.webp"
```

Adavanced Usage
---------------

[](#adavanced-usage)

If you want more than just resizing and cropping the images, you can call the method `manager()` and edit the image like it's an [Intervention Image](https://image.intervention.io/v3). This is a substitute to the upload method, all the other methods still work (Like `path()`, `name()` and `format()`). After editing, to upload the image you can call the method `save()` to upload the image to the specified path and format.

```
ImageUpload::manager($image);
```

### Example

[](#example)

```
use Mindshaker\ImageUpload\Facades\ImageUpload;

$image = $request->file('image');

ImageUpload::manager($image)->pad(512, 512, 'ccc')->format("png")->save();
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance46

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.7% 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 ~64 days

Recently: every ~110 days

Total

8

Last Release

409d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/50495592?v=4)[Miguel Neves](/maintainers/mpn7)[@mpn7](https://github.com/mpn7)

---

Top Contributors

[![mpn7](https://avatars.githubusercontent.com/u/50495592?v=4)](https://github.com/mpn7 "mpn7 (11 commits)")[![RodrigoMSerafim](https://avatars.githubusercontent.com/u/162578256?v=4)](https://github.com/RodrigoMSerafim "RodrigoMSerafim (1 commits)")

---

Tags

laravelimageupload

### Embed Badge

![Health badge](/badges/mindshaker-image-upload/health.svg)

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

###  Alternatives

[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.5M85](/packages/unisharp-laravel-filemanager)[intervention/image-laravel

Laravel Integration of Intervention Image

1588.9M183](/packages/intervention-image-laravel)[sopamo/laravel-filepond

Laravel backend module for filepond uploads

216304.1k3](/packages/sopamo-laravel-filepond)

PHPackages © 2026

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