fromjun/laravel-imageresizer-sdk

Laravel SDK для Image Resizer Service

1.0.2 2025-05-01 11:25 UTC

This package is not auto-updated.

Last update: 2025-05-02 09:54:21 UTC


README

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