Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mezcalito/imgproxy-bundle
Integration with imgproxy (on-the-fly image processing)
https://github.com/mezcalito/imgproxy-bundle
bundle imgpoxy php symfony
Last synced: 2 months ago
JSON representation
Integration with imgproxy (on-the-fly image processing)
- Host: GitHub
- URL: https://github.com/mezcalito/imgproxy-bundle
- Owner: Mezcalito
- License: mit
- Created: 2023-04-17T14:25:31.000Z (over 1 year ago)
- Default Branch: 0.x
- Last Pushed: 2024-01-08T07:32:00.000Z (12 months ago)
- Last Synced: 2024-10-01T15:27:20.133Z (3 months ago)
- Topics: bundle, imgpoxy, php, symfony
- Language: PHP
- Homepage:
- Size: 47.9 KB
- Stars: 8
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# imgproxy Bundle
This bundle provides [imgproxy](https://imgproxy.net/) integration for
[Symfony](https://symfony.com/) based projects.## Installation
Run this command in your terminal:
```bash
composer require mezcalito/imgproxy-bundle
```If you don't use Symfony Flex, you must enable the bundle manually in the
application:```php
['all' => true]
];
```## Basic Usage
This bundle works by applying presets on images, from template or from your
code. Your presets are defined within the application's configuration file
(`/config/packages/imgproxy.yaml`).At the moment, there is only one preset available with this bundle: the
`resize` preset. More possibilities will be added later.To use this bundle, create the following file:
```yaml
# config/packages/imgproxy.yamlimgproxy:
host: localhost
media_url: https://media.localhost# set the same key and salt in imgproxy environment (https://docs.imgproxy.net/signing_the_url)
signature:
key: c27f2c1d
salt: fa242e79# default settings applied for all presets
default_preset_settings:
format: webp
encode: truepresets:
# this is a preset example with all the configuration available
png_thumbnail:
format: png
resize:
resizing_type: fit
width: 150
height: 75
enlarge: true
extend:
extend: true
gravity:
type: no
x_offset: 10
y_offset: 10
```Then, you can use your preset in your templates:
```html
```## Issues and feature requests
Please report issues and request features
at https://github.com/mezcalito/imgproxy-bundle/issues.## License
This bundle is under the MIT license. For the whole copyright, see
the [LICENSE](LICENSE) file distributed with this source code.