This package is used to download images from a storage disk configured in the config/filesystems.php of your Laravel
project and upload them to your Akeneo PIM.
The process of setting images in Akeneo consists of two steps.
In order to set images, the disk and path are saved with a checksum of the file in the database. This way we prevent uploading the same image over and over again.
Next, the image will be uploaded. By using the information stored in the database, the data is sent over to Akeneo.
You can install the package via composer.
composer require justbetter/laravel-akeneo-imagesIf you wish to configure the queue of jobs, publish the configuration of this package.
php artisan vendor:publish --provider="JustBetter\AkeneoImages\ServiceProvider" --tag=configMake sure you have a disk configured in your config/filesystems.php.
Set up your Akeneo connection. More information can be found here.
In order to start processing images, the ProcessImageJob has to be dispatched. This is the only thing you'll have to
do when using the default functionalities.
<?php
use JustBetter\AkeneoImages\Jobs\ProcessImageJob;
ProcessImageJob::dispatch('disk', '/path/to/image.jpeg', [
'identifier' => 'sku',
'attribute' => 'image',
'type' => 'product',
'scope' => null,
'locale' => null,
]);The third parameter is an array which represents the $meta. This is used in the UploadImageJob in order to determine
where the image has to be uploaded to.
The UploadImageJob is automatically dispatched by the ProcessImage action when the image passes validation, so there
is no need to dispatch this manually.
This package also ships with a few commands.
php artisan akeneo-image:process {disk} {path} {--force}
php artisan akeneo-image:upload {image-id}You may optionally run the cleanup command to remove images:
php artisan akeneo-image:cleanup --days=30To ensure the quality of this package, run the following command:
composer qualityThis will execute three tasks:
- Makes sure all tests are passed
- Checks for any issues using static code analysis
- Checks if the code is correctly formatted
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.