Download the PHP package melsaka/laravel-image-manager without Composer

On this page you can find all versions of the php package melsaka/laravel-image-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-image-manager

Laravel Image Manager Package

A comprehensive Laravel package for managing polymorphic images with automatic resizing, multiple formats support, and flexible storage options.

Features

Installation

Install the package via Composer:

Publish the configuration file:

Publish the migration file: (optional)

Run the migration:

Configuration

The configuration file config/image-manager.php allows you to customize:

Example Configuration

Important: Storage Link

If you're using the public disk (default), don't forget to create the storage link:

This creates a symbolic link from public/storage to storage/app/public, making your images accessible via URL.

Usage

1. Add the Trait to Your Model

If you want you can always eager load the model images like that (optional):

2. Configure Image Handling for the Model

By default, every model that uses the HasImages trait automatically supports a 'default' image type with predefined sizes. You can start using it immediately without any configuration:

Default Configuration

The default 'default' image type comes with these sizes:

3. Store Images

4. Retrieve Images

5. Delete Images

6. Advanced Operations

7. Eager Load Images

8. API Resources

In eloquent api resource you can do something like that:

Customizing Image Types (Optional)

You can customize the default configuration or add additional image types by implementing the supportedImages() method:

Configuration Structure

Resize Modes

The package uses Intervention Image for image processing. The following modes are supported:

Mode Behavior Use Case
cover Crop and resize to exact dimensions, maintaining aspect ratio Profile pictures, thumbnails, hero images
coverDown Like cover, but only shrinks (never enlarges) Thumbnails where you don't want to upscale small images
scale Scale proportionally within dimensions, maintaining aspect ratio Product images, galleries where full content matters
scaleDown Like scale, but only shrinks (never enlarges) Preventing upscaling of small images
resize Resize to exact dimensions (may distort if aspect ratio differs) When exact dimensions are critical
resizeDown Like resize, but only shrinks (never enlarges) Fixed dimensions without upscaling
pad Resize to fit and add padding to reach exact dimensions Consistent dimensions with preserved content
contain Resize to fit within dimensions and center with padding Product images on solid backgrounds

Background Color: For pad and contain modes, you can optionally specify a background color (hex format without #):

Note:

Best Practices

Environment Variables

You can override configuration values using environment variables:

Requirements

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-image-manager with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1|^8.2|^8.3
laravel/framework Version ^10.0|^11.0|^12.0
intervention/image Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package melsaka/laravel-image-manager contains the following files

Loading the files please wait ...