medialibrary-development

Installation
SKILL.md

Media Library Development

Overview

Use spatie/laravel-medialibrary to associate files with Eloquent models. Supports image/video conversions, responsive images, multiple collections, and various storage disks.

When to Activate

  • Activate when working with file uploads, media attachments, or image processing in Laravel.
  • Activate when code references HasMedia, InteractsWithMedia, the Media model, or media collections/conversions.
  • Activate when the user wants to add, retrieve, convert, or manage files attached to Eloquent models.

Scope

  • In scope: media uploads, collections, conversions, responsive images, custom properties, file retrieval, path/URL generation.
  • Out of scope: general file storage without Eloquent association, non-Laravel frameworks.

Workflow

  1. Identify the task (model setup, adding media, defining conversions, retrieving files, etc.).
  2. Read references/medialibrary-guide.md and focus on the relevant section.
  3. Apply the patterns from the reference, keeping code minimal and Laravel-native.
Installs
34
GitHub Stars
6.1K
First Seen
Feb 13, 2026