Looking to hire Laravel developers? Try LaraJobs

laravel-imageresizer-sdk maintained by fromjun

Description
Laravel SDK для Image Resizer Service
Last update
2025/05/01 13:25 (dev-main)
License
Links
Downloads
5

Comments
comments powered by Disqus

Laravel Image Resizer SDK

A Laravel wrapper for m1n64/image-resizer-sdk that provides seamless integration via service provider and facade.

Installation

composer require fromjun/laravel-imageresizer-sdk

Configuration

To publish the configuration file:

php artisan vendor:publish --tag=config

Add the following to your .env file:

IMAGE_RESIZER_API_KEY=your-api-key
IMAGE_RESIZER_BASE_URL=http://imageresizer:5689
IMAGE_RESIZER_PUBLIC_URL=http://localhost:5689

Usage

Using the facade:

use ImageResizer;

ImageResizer::ping(); // Check connection
ImageResizer::upload('/path/to/image.jpg');

Using dependency injection:

use M1n64\ImageResizer\Client;

public function __construct(protected Client $client) {}

public function store()
{
    $response = $this->client->upload($filePath);
}

Original SDK

➡️ github.com/m1n64/image-resizer-sdk - PHP SDK

➡️ github.com/m1n64/image-resizing-shared-service - Service