PHPackages                             noobtrader/laravel-media-library - 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. noobtrader/laravel-media-library

ActiveLibrary

noobtrader/laravel-media-library
================================

A media library package for Laravel with local and cloud storage support.

01Blade

Since Mar 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/anikrahman0/laravel-media-library)[ Packagist](https://packagist.org/packages/noobtrader/laravel-media-library)[ RSS](/packages/noobtrader-laravel-media-library/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Storage Disk Configuration Guide
================================

[](#storage-disk-configuration-guide)

This documentation outlines how to configure different storage disk options for your application. The available storage options are:

1. **Public Storage**
2. **MinIO (S3 Compatible Storage)**
3. **DigitalOcean Spaces (S3 Compatible Storage)**

If `STORAGE_DISK` is not explicitly defined in the environment file (`.env`), the system will default to using `public` storage.

1. Public Storage (Default)
---------------------------

[](#1-public-storage-default)

The public storage disk is the default option. If `STORAGE_DISK` is not set, it will automatically default to `public`.

### **Environment Variables for Public Storage**

[](#environment-variables-for-public-storage)

```
STORAGE_DISK=public
CDN_URL=http://medialibrary.test
```

### **Usage**

[](#usage)

- The `public` disk stores media files inside Laravel's `storage/app/public` directory.
- It is served through `public_path()`.
- No additional credentials are required.
- The CDN URL can be defined to serve media files via a custom domain.

---

2. MinIO Storage (AWS S3 Compatible)
------------------------------------

[](#2-minio-storage-aws-s3-compatible)

MinIO is an object storage service that follows the Amazon S3 API.

### **Environment Variables for MinIO**

[](#environment-variables-for-minio)

```
STORAGE_DISK=minio
AWS_DISK=s3
AWS_ACCESS_KEY_ID=eMpfUmR3LWyn5u7rbdiu7a6ghk
AWS_SECRET_ACCESS_KEY=MsWrlFgTxvDmmVvVH0d8uPdojdya7xzRD6zK4gA3
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=demo24
AWS_USE_PATH_STYLE_ENDPOINT=true
AWS_ENDPOINT=https://bucket.demo.com
CDN_URL=https://cdn.demo.com/demo24
```

### **Usage**

[](#usage-1)

- `AWS_DISK` is set to `s3`, meaning Laravel will use S3-compatible storage.
- `AWS_ENDPOINT` defines the MinIO or S3-compatible storage endpoint.
- `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` authenticate the storage service.
- The CDN URL can be configured to serve assets via a custom domain.

---

3. DigitalOcean Spaces Storage
------------------------------

[](#3-digitalocean-spaces-storage)

DigitalOcean Spaces is an object storage service similar to AWS S3.

### **Environment Variables for DigitalOcean Spaces**

[](#environment-variables-for-digitalocean-spaces)

```
STORAGE_DISK=do_spaces
DO_SPACES_KEY=DOdDAHY$SJDIU&h
DO_SPACES_SECRET=zcxqqfygga5gY3rfTN41qIby/kcSFF3kVQk5hhOed
DO_SPACES_ENDPOINT=https://sgp1.digitaloceanspaces.com
DO_SPACES_REGION=SGP1
DO_SPACES_BUCKET=s3.demo24
CDN_URL=https://cdn.demo.com
```

### **Usage**

[](#usage-2)

- `STORAGE_DISK=do_spaces` selects DigitalOcean Spaces as the storage backend.
- `DO_SPACES_ENDPOINT` specifies the region and endpoint for the storage service.
- `DO_SPACES_KEY` and `DO_SPACES_SECRET` authenticate the connection.
- The CDN URL can be used to serve files via DigitalOcean’s built-in CDN.

---

Default Behavior
----------------

[](#default-behavior)

If `STORAGE_DISK` is not set in the `.env` file, the system will use `public` as the default disk. This ensures that the application remains functional even without a configured storage backend.

### **Example Default Behavior**

[](#example-default-behavior)

```
# No STORAGE_DISK defined
# The application will default to public storage
```

---

Conclusion
----------

[](#conclusion)

- **Use `public` storage** if you want local file storage with Laravel.
- **Use `minio` storage** for S3-compatible services like MinIO or AWS S3.
- **Use `do_spaces` storage** if you are using DigitalOcean Spaces.
- Always configure the `CDN_URL` if you plan to serve files via a CDN.
- If `STORAGE_DISK` is not defined, `public` will be used as the default storage option.

This setup ensures a flexible and scalable media storage solution for your Laravel application.

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/08b28ae71fbcbef3843e336d0e4b7ba9e9fffc0d388daecb6e2ee23cd0225570?d=identicon)[anikrahman0](/maintainers/anikrahman0)

---

Top Contributors

[![anikrahman0](https://avatars.githubusercontent.com/u/52888800?v=4)](https://github.com/anikrahman0 "anikrahman0 (2 commits)")

### Embed Badge

![Health badge](/badges/noobtrader-laravel-media-library/health.svg)

```
[![Health](https://phpackages.com/badges/noobtrader-laravel-media-library/health.svg)](https://phpackages.com/packages/noobtrader-laravel-media-library)
```

PHPackages © 2026

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