Skip to content

Commit

Permalink
ImageProcessor documentation restored
Browse files Browse the repository at this point in the history
  • Loading branch information
Spomky committed Jan 23, 2024
1 parent 1091229 commit 4973e8c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 4973e8c

Please sign in to comment.