Image scaling one by one

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
tyteck
Posts: 8
Joined: 23 Apr 2020, 19:22

Image scaling one by one

Post by tyteck » 28 Apr 2020, 12:22

Hello and thanks again for aimeos.

OS : Ubuntu 18.04
Laravel : 6
package : "aimeos/aimeos-laravel": "~2019.10",

You already helped me on unset catalog during import csv and it's working (thanks).

My problem now is to generate preview on demand.
I explain.
The shop I'm working on is importing products from many partners and frequently the product image is obtained with an additional query. Every time I process one partner I'm updating dozens/hundreds of product. Getting the picture during import would make it very long. So I create a big csv with products, then I'm creating a job to grab all the image from url later (with a job/queue).
One "this product has no cover yet" image is set meanwhile.
In the csv, I'm setting the final path of the media. Import is running fine.

What I would want is, once the image has been downloaded; generate the preview with a

Code: Select all

artisan aimeos:jobs media/scale <PRODUCT>
Is it possible ? If yes, what is the best way to achieve this with aimeos ?
Thanks

User avatar
aimeos
Administrator
Posts: 7915
Joined: 01 Jan 1970, 00:00

Re: Image scaling one by one

Post by aimeos » 29 Apr 2020, 09:22

You could overwrite the media processor and remove that line in your code:
https://github.com/aimeos/ai-controller ... #L178-L180

Configure your new media processor using:

Code: Select all

controller/common/product/import/csv/processor/media/name = Myprocessor
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply