Skip to content

clementbo50/responsive-images

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Responsive Images — Azuriom Plugin

Automatically generates optimized WebP variants for every image uploaded to your Azuriom site.

Features

  • Automatic WebP variant generation on image upload
  • Automatic variant deletion when the source image is deleted
  • Admin interface to view variant status per image
  • Manual variant regeneration per image
  • Built on PHP's GD extension — no external dependencies

Requirements

Requirement Version
PHP >= 8.3
GD enabled
Azuriom API >= 1.1.0

Installation

  1. Copy the responsive-images folder into plugins/
  2. Run migrations:
php artisan migrate
  1. Enable the plugin from the Azuriom admin panel

Breakpoints

Name Width
sm 480px
md 768px
lg 1024px
xl 1440px
xxl 1920px

How it works

Upload

Image upload
     │
     ▼
ImageObserver::created()
     │
     ▼
ResponsiveImageService::convertFromImage()
     │
     ├─ Resize to each breakpoint
     └─ Save as WebP → storage/app/public/img/responsive/{image_name}/
     │
     ▼
ImageVariant::create()
     └─ Stores { width: filename } mapping as JSON

Deletion

Image deleted (Azuriom core)
     │
     └─ Deletes original file from storage
     │
     ▼
ImageObserver::deleting()
     │
     ▼
ImageVariant::findForImage()
     │
     ├─ Deletes each WebP variant from storage/app/public/img/responsive/{image_name}/
     └─ Deletes the ImageVariant record from the database

The plugin handles variant cleanup independently from the core.
Azuriom only deletes the original file variant lifecycle is fully managed by this plugin.

License

MIT

About

Automatically generates optimized WebP variants for every image uploaded to your Azuriom site.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors