PHPackages                             rashiqulrony/laravel-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. rashiqulrony/laravel-image-upload

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

rashiqulrony/laravel-image-upload
=================================

Laravel image &amp; file upload package with S3 support using Intervention Image.

v1.0.6(10mo ago)047MITPHPPHP ^8.2

Since Apr 16Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/RashiqulRony/laravel-image-upload)[ Packagist](https://packagist.org/packages/rashiqulrony/laravel-image-upload)[ RSS](/packages/rashiqulrony-laravel-image-upload/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (7)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/8d6b3b51e7ba3f9cba19b523d76076007940c668557d01de771cee8403fdcf2c/68747470733a2f2f706f7365722e707567782e6f72672f726173686971756c726f6e792f6c61726176656c2d696d6167652d75706c6f61642f762f737461626c65)](https://packagist.org/packages/rashiqulrony/laravel-image-upload)[![Total Downloads](https://camo.githubusercontent.com/920a3ee91d897b4c4d7145021efc5857c90fd7dce9cf01a3aba4aafa6a4757ad/68747470733a2f2f706f7365722e707567782e6f72672f726173686971756c726f6e792f6c61726176656c2d696d6167652d75706c6f61642f646f776e6c6f616473)](https://packagist.org/packages/rashiqulrony/laravel-image-upload)[![License](https://camo.githubusercontent.com/3fb781e272f3da97fbe08975206a59e166b026fcef56eb967bb2792d280b2c2b/68747470733a2f2f706f7365722e707567782e6f72672f726173686971756c726f6e792f6c61726176656c2d696d6167652d75706c6f61642f6c6963656e7365)](https://packagist.org/packages/rashiqulrony/laravel-image-upload)

Media Uploader
--------------

[](#media-uploader)

`imageupload` is Basic image upload and thumbnail management package for laravel (version: laravel/framework: ^8.0|^9.0|^10.0|^11.0|^12.0).

It also includes file and image preview functionality.

Install
-------

[](#install)

Via Composer

```
composer require rashiqulrony/laravel-image-upload
```

#### Publish config file

[](#publish-config-file)

You should publish the config file with:

```
php artisan vendor:publish --provider="Rashiqulrony\LaravelImageUpload\Providers\AppServiceProvider" --tag=config

```

In `config/imageupload.php` config file you should set `imageupload` global path.

```
return [
    /*
    |--------------------------------------------------------------------------
    | Base Directory
    |--------------------------------------------------------------------------
    |
    | base_dir stores all other directory inside storage folder of your laravel application by default
    | if you specify any name. all storage will be done inside that directory or name that you specified
    |
    */

    'base_dir' => null,

    /*
    |--------------------------------------------------------------------------
    | Thumb Directory
    |--------------------------------------------------------------------------
    |
    | thumb_dir creates another folder inside the directory as a "thumb" by default
    | you can change the name thumb to any other name you like.
    */

    'thumb_dir' => 'thumb',

    /*
    |--------------------------------------------------------------------------
    | Timestamp Prefix
    |--------------------------------------------------------------------------
    |
    | If timestamp_prefix is true then create a file with a timestamp to ignore the same name image replacement. Example: image-1658562981.png.
    | If timestamp_prefix is false then the script checks file exists or not if the file exists then add the time() prefix for the new file otherwise leave it as the file
    | name.
    */

    'timestamp_prefix' => false,

    /*
    |--------------------------------------------------------------------------
    | Thumb Image Height Width
    |--------------------------------------------------------------------------
    |
    | specify the thumb image ratio of height and weight by default it takes 300px X 300px
    */

    'image_thumb_height' => 300,
    'image_thumb_width' => 300,

    /*
    |--------------------------------------------------------------------------
    | Folder permission
    |--------------------------------------------------------------------------
    |
    | path_permission , if you create a folder in your project then you can define your folder permission.
    | Example: null, 0755, 0777
    */

    'path_permission' => 0777,
];
```

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

[](#configuration)

Before using this, you must complete the following steps (if you want to use the default filesystem disk, which is public):

Change your env filesystem drive to this if you want to use public storage directory.

```
FILESYSTEM_DISK=public

```

Please make sure to link your storage before using this package

```
php artisan storage:link
```

### Image Upload

[](#image-upload)

Use this class

```
use Rashiqulrony\LaravelImageUpload\Uploader;

```

**Using Controller for Image Upload**

```
/**
* Upload an image with optional resizing and thumbnail creation.
*
* @param mixed $requestFile Uploaded file from the request.
* @param string $path Destination folder path.
* @param bool $thumb Generate thumbnail or not.
* @param string|null $name Optional custom filename.
* @param array $imageResize Resize dimensions [width, height].
* @param array $thumbResize Thumbnail dimensions [width, height].
* @return array Uploaded image information.
*/

return Uploader::imageUpload($request->image, $path, 1, $name, [300, 300], [200, 200]);

```

Response

```
{
    "name": "1744802578-60164bb368db6.jpg",
    "originalName": "60164bb368db6.jpg",
    "size": 24418,
    "ext": "jpg",
    "url": "http://127.0.0.1:8000/storage/upload/1744802578-60164bb368db6.jpg",
    "thumbUrl": "http://127.0.0.1:8000/storage/upload/thumb/1744802578-60164bb368db6.jpg"
}

```

**Using Controller for video Upload**

```
/**
* Upload a video file.
*
* @param mixed $requestFile Video file from request.
* @param string $path Destination path.
* @param string|null $name Optional custom filename.
* @return array Uploaded video file info.
*/
return Uploader::videoUpload($request->video, $path, $name);

```

Response

```
{
    "name": "123.mp4",
    "originalName": "Web 1st slide Without Text new 04-25.mp4",
    "size": 709821,
    "ext": "mp4",
    "url": "http://127.0.0.1:8000/storage/upload/123.mp4"
}

```

**Using Controller for File Upload**

```
/**
* Upload any type of file.
*
* @param mixed $requestFile File from request.
* @param string $path Destination folder path.
* @param string|null $name Optional custom filename.
* @return array Uploaded file info.
*/
return Uploader::fileUpload($request->video, $path, $name);

```

Response

```
{
    "name": "123.pdf",
    "originalName": "Registration_Form.pdf",
    "size": 1082270,
    "ext": "pdf",
    "url": "http://127.0.0.1:8000/storage/upload/123.pdf"
}

```

**Using Controller for Upload Base64 Image Upload**

```
/**
* Upload a base64-encoded image.
*
* @param string $base64 Base64 encoded image string.
* @param string $path Destination folder path.
* @param string|null $name Optional custom filename.
* @return array Uploaded image info.
*/

return Uploader::imageUploadBase64($request->base64data, $path, $name);

```

Response

```
{
    "name": "image.png",
    "url": "http://127.0.0.1:8000/storage/upload/image.png"
}

```

**Using Controller for Delete Media or Any File**

```
/**
* Delete a file and optionally its thumbnail.
*
* @param string $file File name.
* @param string $path File path.
* @param bool $thumb Whether to delete the thumbnail.
* @return bool Success status.
*/
return Uploader::mediaDelete($file, $path, 1);

```

Response

```
return true or false;

```

**Using Controller for Remove a Directory or Folder**

```
/**
* Delete an entire folder.
*
* @param string $path Folder path.
* @return bool Success status.
*/
return Uploader::removeDir($path);

```

Response

```
return true or false;

```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance55

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

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

Total

6

Last Release

302d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d301c639370dadda25d65871b9043681d493558350988527101e60948840229?d=identicon)[rashiqulrony](/maintainers/rashiqulrony)

---

Top Contributors

[![RashiqulRony](https://avatars.githubusercontent.com/u/26733567?v=4)](https://github.com/RashiqulRony "RashiqulRony (3 commits)")

---

Tags

laravelfile-uploaderLaravel Image UploadRashiqulRonySimple File and Image Uploader

### Embed Badge

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

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

###  Alternatives

[alexusmai/laravel-file-manager

File manager for Laravel

1.2k757.8k8](/packages/alexusmai-laravel-file-manager)

PHPackages © 2026

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