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

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

baki/image
==========

Store image

043PHP

Since Sep 29Pushed 5y agoCompare

[ Source](https://github.com/BojanDjurdjevic995/image)[ Packagist](https://packagist.org/packages/baki/image)[ RSS](/packages/baki-image/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Require this package with composer:

```
composer require baki/image

```

Usage
=====

[](#usage)

To use Image package, use this in your controller

```
use StoreImage;

```

After that, create your disk in config/filesystems.php

```
'yourDisk' => [
            'driver' => 'local',
            'root' => storage_path('app/public/your-directory'),
            'url' => env('APP_URL').'/your-directory',
            'visibility' => 'public',
        ],

```

Example
=======

[](#example)

If you want to save your pictures (eg. for your News) and get the name of those pictures
Follow this command:

```
{{-- Input in laravel blade --}}

$news->image = StoreImage::store('your_input_name', 'yourDisk', $request, 'default-pictures.jpg', false(for store), $news->old_image_from_database(enter if the previous parameter is true), 'width', 'height');

// Function to store your news and pictures
public function store(Request $r)
{
    $input = new News;

    // It is without crop image
    $input->image = StoreImage::store('your_input_name', 'yourDisk', $request, 'default-pictures.jpg');

    // It is with crop image
    $input->image = StoreImage::store('your_input_name', 'yourDisk', $request, 'default-pictures.jpg', false, '', 100, 100);

    $input->save();
    return redirect()->route('news.index'); // This is my route. You can use your route.
}

```

If you want to edit your news. Old pictures will be delete, but default pictures will not be delete
Follow command:

```
$news->image = StoreImage::store('your_input_name', 'yourDisk', $request, 'default-pictures.jpg', true(for edit), $news->old_image_from_database(enter if the previous parameter is true), 'width', 'height');

// Function to update your news and pictures
public function update(Request $r, News $news)
{
    // It is without crop image
    $news->image = StoreImage::store('your_input_name', 'yourDisk', $request, 'default-pictures.jpg', true, $news->old_image_from_database);

    // It is with crop image
    $news->image = StoreImage::store('your_input_name', 'yourDisk', $request, 'default-pictures.jpg', true, $news->old_image_from_database, 'width', 'height');

    $news->save();
    return redirect()->route('news.index'); // It is my route. You can use your route.
}

```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 Bus Factor1

Top contributor holds 80.4% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9e893ad5d688f522745b4def59edf658bc65d19cdbb8094911da476acd1268b1?d=identicon)[baki1995](/maintainers/baki1995)

---

Top Contributors

[![BojanDjurdjevic995](https://avatars.githubusercontent.com/u/47319947?v=4)](https://github.com/BojanDjurdjevic995 "BojanDjurdjevic995 (37 commits)")[![Baki995](https://avatars.githubusercontent.com/u/118567196?v=4)](https://github.com/Baki995 "Baki995 (9 commits)")

### Embed Badge

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

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

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M125](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

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