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

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

osama/image-paste
=================

A Laravel Nova Image field. you can paste or drag or chose an image

v2.1(5y ago)12.1k1MITVuePHP &gt;=7.1.0

Since May 6Pushed 5y ago1 watchersCompare

[ Source](https://github.com/osamaAbdullah/paste-image)[ Packagist](https://packagist.org/packages/osama/image-paste)[ RSS](/packages/osama-image-paste/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (4)Used By (0)

paste-image
===========

[](#paste-image)

This is a Laravel nova field provides an easy interface to upload delete edit an image.

Originally package was developed on PHP 7.3.11 and Laravel 7.8, but should work on lower versions too.

updated to v2.0
---------------

[](#updated-to-v20)

Features
--------

[](#features)

- paste image
- drag and drop
- chose an image
- preview befor submiting
- change or delete before submitting
- pass custom url only one time for (form, index, view) pages **-&gt;url()** (new to v2.0)
- clickable small image in index view with full-size image in modal (new to v2.0)
- passing **[-&gt;acceptedTypes()](https://nova.laravel.com/docs/2.0/resources/file-fields.html#customizing-accepted-file-types)** like native file field in nova (new to v2.0)
- passing **-&gt;sizeForIndex($height, $width)** customizing image size in index page (new to v2.0)

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

[](#installation)

Via Composer

```
$ composer require osama/image-paste
```

Basic Usage
-----------

[](#basic-usage)

in your resource fields method add the field

```
use Osama\ImagePaste\ImagePaste;

ImagePaste::make('Image')->disk('osama')->url('/images/{image}/get-preview-image'), // you can customize it now in v2.0
```

in your config/filesystem.php add this to disks

```
 'disks' => [
    'osama' => [
                'driver' => 'local',
                'root' => public_path('images/osama'),
                'url' => env('APP_URL').'/images/osama',
                'visibility' => 'public',
            ],
  ],
```

in your route file add this route

```
Route::get('/images/{image}/get-preview-image', function ($image){  // you can customize it now in v2.0
	return new Response(Storage::disk('osama')->get($image), 200);
});
```

Advanced Usage
--------------

[](#advanced-usage)

```
use Osama\ImagePaste\ImagePaste;

ImagePaste::make('image')
    ->canSee(function () use ($user) { return $user->hasPermission('orders-fields-image-see');})
    ->hideWhenUpdating(!$user->hasPermission('orders-fields-image-edit'))
    ->disk('osama')  // you can define your own disk
    ->prunable($isNotDefault = $this->image !== 'default.png')
    ->deletable(true) // if true you will see delete icon on the bottom right corner. make sure you make column nullable in you migration
//    ->preview(function () { // related to v1.0
//      return url('/orders/' . $this->id . '/image');
//    })
    ->acceptedTypes('image/*')
    ->sizeForIndex(50, 50) // (height, width) measured with pixels
    ->url('/orders/' . $this->id . '/image') // you can pass custom url to perview image
    ->hideFromIndex()
    ->rules('nullable', 'image', 'max:2000'),
```

Author
------

[](#author)

- [osama](https://github.com/osamaAbdullah)

Issues
------

[](#issues)

if you found any issues feel free to register it in issues.

Screenshots
-----------

[](#screenshots)

CreateDetailUpdateIndexModal in index[![nova-responsive-detail-view](screenshots/creation.png)](screenshots/creation.png)[![nova-responsive-create-view](screenshots/detail.png)](screenshots/detail.png)[![nova-responsive-delete-view](screenshots/update.png)](screenshots/update.png)[![nova-responsive-delete-view](screenshots/index.png)](screenshots/index.png)[![nova-responsive-delete-view](screenshots/full-size-image-in-modal-index-page.png)](screenshots/full-size-image-in-modal-index-page.png)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

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

Total

3

Last Release

2137d ago

Major Versions

v1.0.0 → v2.02020-06-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/846f741da91d897888e00186bae907778ca88f28e03b8838d5ec8c3dac3b6287?d=identicon)[osamaAbdullah](/maintainers/osamaAbdullah)

---

Top Contributors

[![osamaAbdullah](https://avatars.githubusercontent.com/u/26807223?v=4)](https://github.com/osamaAbdullah "osamaAbdullah (8 commits)")

---

Tags

laravelnova

### Embed Badge

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

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

###  Alternatives

[classic-o/nova-media-library

Tool and field that will let you managing files and add them to the posts

154172.0k](/packages/classic-o-nova-media-library)[mostafaznv/nova-ckeditor

CkEditor for Laravel Nova

57327.2k1](/packages/mostafaznv-nova-ckeditor)[r64/nova-image-cropper

A Laravel Nova field.

56293.4k](/packages/r64-nova-image-cropper)[mostafaznv/nova-video

Video Field for Laravel Nova

22398.0k1](/packages/mostafaznv-nova-video)[silvanite/nova-field-cloudinary

A Laravel Nova Image Field with Flysystem Adapter for storing and retrieving media from Cloudinary

2772.0k3](/packages/silvanite-nova-field-cloudinary)[stepanenko3/nova-media-field

A Laravel Nova field for laravel-medilibrary.

1717.5k](/packages/stepanenko3-nova-media-field)

PHPackages © 2026

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