From 4973e8c08e39c05bda7c332edd7f43273e2632bf Mon Sep 17 00:00:00 2001 From: Florent Morselli Date: Tue, 23 Jan 2024 14:28:25 +0100 Subject: [PATCH] ImageProcessor documentation restored --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 853e05c..1646f2c 100644 --- a/README.md +++ b/README.md @@ -101,9 +101,19 @@ pwa: Thanks to Symfony Asset Mapper, the bundle is able to link your application assets to the manifest file. Please note that the icons of a size greater than 1024px may be ignored by the browser. +When you use images (icons or screenshots), you must define an ImageProcessor. +The bundle provides two image processors: + +* `pwa.image_processor.gd`: this processor uses the GD library. +* `pwa.image_processor.imagick`: this processor uses the Imagick library. + +Use one of these processors in your configuration file. You can define a custom image processor if you want. +This service must implement the `SpomkyLabs\PwaBundle\ImageProcessor\ImageProcessor` interface. + ```yaml # config/packages/phpwa.yaml pwa: + image_processor: 'pwa.image_processor.gd' icons: - src: "images/logo.png" sizes: [48, 96, 128, 256, 512, 1024]