PHPackages                             mansoor/filament-unsplash-picker - 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. mansoor/filament-unsplash-picker

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

mansoor/filament-unsplash-picker
================================

This is my package filament-unsplash-picker

v4.0(9mo ago)227.7k↑60%8[1 issues](https://github.com/mansoorkhan96/filament-unsplash-picker/issues)2MITPHPPHP ^8.1 || ^8.2 || ^8.3CI passing

Since Mar 21Pushed 3mo ago3 watchersCompare

[ Source](https://github.com/mansoorkhan96/filament-unsplash-picker)[ Packagist](https://packagist.org/packages/mansoor/filament-unsplash-picker)[ Docs](https://github.com/mansoor/filament-unsplash-picker)[ GitHub Sponsors](https://github.com/mansoor)[ RSS](/packages/mansoor-filament-unsplash-picker/feed)WikiDiscussions 4.x Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (19)Used By (2)

Unsplash Picker for Filament
============================

[](#unsplash-picker-for-filament)

[![Latest Version on Packagist](https://camo.githubusercontent.com/bfbf6acf092c48dc212343df50d8d662868c0da6a2bbe12d03d24180ba65d299/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d616e736f6f722f66696c616d656e742d756e73706c6173682d7069636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mansoor/filament-unsplash-picker)[![Tests](https://github.com/mansoorkhan96/filament-unsplash-picker/actions/workflows/run-tests.yml/badge.svg)](https://github.com/mansoorkhan96/filament-unsplash-picker/actions/workflows/run-tests.yml)[![PHP Code Styling](https://github.com/mansoorkhan96/filament-unsplash-picker/actions/workflows/fix-php-code-style-issues.yml/badge.svg)](https://github.com/mansoorkhan96/filament-unsplash-picker/actions/workflows/fix-php-code-style-issues.yml)[![Total Downloads](https://camo.githubusercontent.com/54d883e236f8f0b6ac48197208bb5622eb08a1aa5f95c9709ecabd7251b64a4f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d616e736f6f722f66696c616d656e742d756e73706c6173682d7069636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mansoor/filament-unsplash-picker)

Unsplash Gallery for Filament. Search and pick any image from Unsplash.com, specify which size to use.

[![](./resources/screenshot.png)](./resources/screenshot.png)

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

[](#installation)

You can install the plugin via composer:

```
composer require mansoor/filament-unsplash-picker
```

Add Unsplash Client ID to `config/services.php`

```
'unsplash' => [
    'client_id' => env('UNSPLASH_CLIENT_ID'),
],
```

Important

If you have not set up a custom theme and are using Filament Panels follow the instructions in the [Filament Docs](https://filamentphp.com/docs/4.x/styling/overview#creating-a-custom-theme) first.

After setting up a custom theme add the plugin's views to your theme css file.

```
@source '../../../../vendor/mansoor/filament-unsplash-picker/resources/**/*.blade.php';
```

Add plugin views to your theme css file is the only change you need to upgrade to 4.x.

Usage
-----

[](#usage)

Just add the `UnsplashPickerAction` to your FileUpload Field's action.

```
use Mansoor\UnsplashPicker\Actions\UnsplashPickerAction;

Forms\Components\FileUpload::make('featured_image')
    ->image()
    ->hintAction(
        UnsplashPickerAction::make()
    )
```

This plugin also supports all the features for [Spatie Media Libaray Plugin](https://filamentphp.com/plugins/filament-spatie-media-library)

```
SpatieMediaLibraryFileUpload::make('featured_image')
    ->image()
    ->hintAction(
        UnsplashPickerAction::make()
    )
```

Specifying Image Size
---------------------

[](#specifying-image-size)

You can specify which image size to use.

```
UnsplashPickerAction::make()
    ->regular()
```

**Available sizes:**

- `->raw()`
- `->full()`
- `->regular()`
- `->small()`
- `->thumbnail()`

Choose multiple photos
----------------------

[](#choose-multiple-photos)

If you add `->multiple()` to your FileUpload field, the plugin will allow you to pick multiple images. The plugin respects the validation so you will only be able to pick max files set by the FileUpload field.

```
FileUpload::make('featured_image')
    ->multiple() // This will indicate the plugin to allow the user to pick multiple files
    ->hintAction(
        UnsplashPickerAction::make()
    )
```

Specifying Per Page
-------------------

[](#specifying-per-page)

You may specify how many photos to show per page by appending `->perPage()` method.

```
UnsplashPickerAction::make()
    ->perPage(20)
```

Enable/Disable Square Mode
--------------------------

[](#enabledisable-square-mode)

You can choose to dispaly images in square which uses `aspect-square` class from Tailwind CSS or disable it to display images in original height.

```
UnsplashPickerAction::make()
    ->useSquareDisplay(false)
```

### Default search

[](#default-search)

You may set the default search input.

```
UnsplashPickerAction::make()
    ->defaultSearch('Hello world')
```

You can also pass a custom closure to get search input from a field and return the search string.

```
UnsplashPickerAction::make()
    ->defaultSearch(fn (Get $get) => $get('title'))
```

### Hooks

[](#hooks)

Similar to core Filament, Unsplash picker provides two hooks `beforeUpload` and `afterUpload` to let you use Unsplash data.

```
UnsplashPickerAction::make()
    ->afterUpload(function (array $data) {
        dd($data);
    })
```

Customization
-------------

[](#customization)

The `UnsplashPickerAction` is simple Filament Form Action and you may override all the available methods. The Image picker component is a Livewire component, which is easy to extend.

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="filament-unsplash-picker-views"
```

Important

When defining the `extraAlpineAttributes` method for `SpatieMediaLibraryFileUpload` or `FileUpload` field, make sure to merge the Alpine attributes from `UnsplashPickerAction`.

```
SpatieMediaLibraryFileUpload::make('media')
    ->extraAlpineAttributes(function ($component) {
        return [
            'custom-attribute' => 'custom-attribute-value-goes-here',
            ...UnsplashPickerAction::getExtraAlpineAttributes($component),
        ];
    })
```

Upgrade to 1.x
--------------

[](#upgrade-to-1x)

This plugin is re-written but it is very small and simple, so upgrade is very easy. If you follow the docs from top to bottom, you should be good to use the latest version.

- This plugin no longer ships with config file. Hence per\_page, use\_square\_display are no longer supported. You may use `Action::configureUsing()` in service provider to achieve the same. You may also delete the config file
- `unsplash_client_id` has been removed to from plugin config file. You may add it to `config/services.php`. Please check Installation section.
- Latest version of plugin requires to add a custom theme. Please check Installation section.
- The need for using queueable job to clear/delete un-used media is now removed. So you may use any queue connection desired.
- The language file has been renamed and the structure has changed very much.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Mansoor Ahmed](https://github.com/mansoorkhan96)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance70

Regular maintenance activity

Popularity36

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 90.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 ~38 days

Recently: every ~48 days

Total

19

Last Release

92d ago

Major Versions

v0.0.9 → v1.0.02024-10-19

v1.0.2 → v4.0.0-beta.12025-06-28

v1.0.3 → 5.x-dev2026-02-15

PHP version history (3 changes)v0.0.1PHP ^8.1|^8.2

v1.0.2PHP ^8.1 || ^8.2 || ^8.3

5.x-devPHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/76515e51b221a3505c36acda921bef4520c4b621091233a94b52836a6231bac4?d=identicon)[mansoorkhan96](/maintainers/mansoorkhan96)

---

Top Contributors

[![mansoorkhan96](https://avatars.githubusercontent.com/u/51432274?v=4)](https://github.com/mansoorkhan96 "mansoorkhan96 (39 commits)")[![atmonshi](https://avatars.githubusercontent.com/u/1952412?v=4)](https://github.com/atmonshi "atmonshi (2 commits)")[![belzaaron](https://avatars.githubusercontent.com/u/21190036?v=4)](https://github.com/belzaaron "belzaaron (1 commits)")[![jcongos](https://avatars.githubusercontent.com/u/130073824?v=4)](https://github.com/jcongos "jcongos (1 commits)")

---

Tags

filamentphpgallerylaravelphpunsplashlaravelfilamentimage-pickerUnsplashmansoorfilament-unsplash-picker

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/mansoor-filament-unsplash-picker/health.svg)

```
[![Health](https://phpackages.com/badges/mansoor-filament-unsplash-picker/health.svg)](https://phpackages.com/packages/mansoor-filament-unsplash-picker)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[awcodes/filament-curator

A media picker plugin for FilamentPHP.

434297.7k19](/packages/awcodes-filament-curator)[pboivin/filament-peek

Full-screen page preview modal for Filament

253319.6k12](/packages/pboivin-filament-peek)[croustibat/filament-jobs-monitor

Background Jobs monitoring like Horizon for all drivers for FilamentPHP

254255.2k6](/packages/croustibat-filament-jobs-monitor)[dotswan/filament-map-picker

Easily pick and retrieve geo-coordinates using a map-based interface in your Filament applications.

124139.3k2](/packages/dotswan-filament-map-picker)[stephenjude/filament-jetstream

A Laravel starter kit built with Filament inspired by Jetstream.

17554.3k2](/packages/stephenjude-filament-jetstream)

PHPackages © 2026

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