Download the PHP package ab01faz101/laravel-image-resizer without Composer

On this page you can find all versions of the php package ab01faz101/laravel-image-resizer. 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-resizer

πŸ“¦ Laravel Image Resizer

======================== Packagist Version Downloads License

A simple and flexible Laravel package for resizing and encoding images into multiple sizes and formats, powered by Intervention Image.


✨ Features

πŸš€ Installation

  1. Require the package via Composer (assuming it’s published on Packagist):

  2. (Optional) Publish the config file:

  3. Configure config/laravel_image_resizer.php as needed (see Configuration section).

βš™οΈ Configuration

The package configuration file contains:

return [
    'sizes' => [
        'lg' => [1200, 800],
        'md' => [600, 400],
        'sm' => [150, 150],
    ],
    'config' => [
        'encoder_status' => true,
        'encoder' => 'webp', // supported values: 'webp', 'png', 'jpeg', 'jpg'
    ],
];

πŸ“š Usage

Include the LaravelImageResizer trait in your Laravel class:

use Ab01faz101\LaravelImageResizer\Traits\LaravelImageResizer;

class YourClass
{
    use LaravelImageResizer;

    // Your methods
}

πŸ–ΌοΈ Basic resize and save

use Illuminate\Http\Request;

public function uploadImage(Request $request)
{
    $image = $request->file('image');

    $paths = $this->resizeAndSave(
        $image,
        'uploads/images', // target directory
        'public',         // storage disk
        'webp'            // optional encoder override
    );

    // $paths will be an array with keys: xl, md, sm, xs containing saved paths.
}

πŸ”§ Resize with custom sizes

$sizes = [
    'large' => [1200, 800],
    'medium' => [600, 400],
    'small' => [300, 200],
];

$paths = $this->resizeWithCustomSizes(
    $image,
    $sizes,
    'uploads/custom',
    'public',
    'png'
);

πŸ“‹ Methods

Method

Description

Parameters

Returns

resizeAndSave

Resize the uploaded image into default sizes and save

UploadedFile $image, string $directory, string $disk, ?string $overrideEncoder

Array of saved file paths

resizeWithCustomSizes

Resize the image to custom sizes and save

UploadedFile $image, array $sizes, string $directory, string $disk, ?string $overrideEncoder

Array of saved file paths


πŸ› οΈ Requirements

πŸ“„ License

MIT License


πŸ‘¨β€πŸ’» Author

Abolfazl Qaederahmat


⭐ If you find this package useful, please star the repository on GitHub ⭐

Β© 2025 Abolfazl Qaederahmat


All versions of laravel-image-resizer with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
laravel/framework Version ^11.0 || ^12.0 || ^13.0
intervention/image-laravel Version ^1.5
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 ab01faz101/laravel-image-resizer contains the following files

Loading the files please wait ...