laravelgeekphp/laravel-rekognition

A simple package to enable image alt tag label detection with AWS Rekognition


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This is a simple open-source Laravel Package. It's only purpose is to provide a Facade for getting image labels using AWS Rekognition. Example usage is below, currently only file paths are supported. You pass the path of a file and under the hood the contents of said file is retrieved using Storage facade. The result is passed to Rekognition using HTTP client and image labels are returned.

Support us

You can support us by reading our blog

Installation

You can install the package via composer:

composer require laravelgeekphp/laravel-rekognition

You can publish the config file with:

php artisan vendor:publish --tag="rekognition-config"

This is the contents of the published config file:

return [
    'key'    => env('REKOGNITION_KEY'),
    'secret' => env('REKOGNITION_SECRET'),
    'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
];

Usage

use \LaravelGeek\LaravelRekognition\Facades\Rekognition;
use Illuminate\Support\Facades\Storage;

$imageLabels = Rekognition::getFromFilePath(Storage::path($mediaPath));
// do something with your labels

Testing

composer test

Changelog

This is currently the first version ever published, there is no changelog yet.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

If you discover any security related issues, please email info@laravelgeek.com instead of using the issue tracker.

Credits

License

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