PHP Classes

Laravel Model Images: Store images in models and serve in multiple sizes

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 70 All time: 10,286 This week: 71Up
Version License PHP version Categories
laravel-model-images 1.0.0GNU General Publi...5PHP 5, Graphics, Files and Folders, L..., D...
Description 

Author

This package can store images in models and serve in multiple sizes.

It provides a trait that can be used in model classes of Laravel applications that can handle image file uploads by storing the files in a given directory.

The uploaded images can be filtered using a custom handler or converted to a specific format configured in the model classes.

The package can help serving the stored model images from a URL reachable by the general public.

Model objects that do not yet have associated images, can return a given default image.

It can also serve the publicly available images in multiple sizes. The sizes can be customized from within the model classes.

Innovation Award
PHP Programming Innovation award nominee
May 2021
Number 5
Many sites that display product images or other images need to display the same image in different sizes on different site pages.

This package simplifies the generation of images associated with a Laravel model class. It can generate the different versions of an image in different sizes from the original image stored by the model class.


Manuel Lemos
Picture of Ahmed Saad
  Performance   Level  
Name: Ahmed Saad <contact>
Classes: 10 packages by
Country: Egypt Egypt
Age: ???
All time rank: 213721 in Egypt Egypt
Week rank: 49 Up2 in Egypt Egypt Up
Innovation award
Innovation award
Nominee: 7x

  Files folder image Files (10)  
File Role Description
Files folder imagesrc (3 files, 2 directories)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (10)  /  src  
File Role Description
Files folder imageContracts (2 files)
Files folder imageTraits (2 files)
  Plain text file ImageSaver.php Class Class source
  Plain text file InternentionImageProvider.php Class Class source
  Plain text file SaadImageProvider.php Class Class source

  Files folder image Files (10)  /  src  /  Contracts  
File Role Description
  Plain text file ImageableContract.php Class Class source
  Plain text file ImageProviderContract.php Class Class source

  Files folder image Files (10)  /  src  /  Traits  
File Role Description
  Plain text file HasImages.php Class Class source
  Plain text file MacroableModel.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:70
This week:0
All time:10,286
This week:71Up