hengebytes / ibexa-blurhash
Symfony bundle to generate Image Blurhash in Ibexa CMS
Installs: 72
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=8.1
- ibexa/graphql: ^4.0
- intervention/image: ^2.5
- kornrunner/blurhash: ^1.1
- symfony/config: ^5.4|^6.0|^7.0
- symfony/dependency-injection: ^5.4|^6.0|^7.0
- symfony/http-kernel: ^5.4|^6.0|^7.0
This package is not auto-updated.
Last update: 2024-10-05 03:41:19 UTC
README
composer require hengebytes/ibexa-blurhash
(Optional) configure image transformation
# config/packages/ibexa_blurhash.yaml parameters: # uploaded image resized to 75x75 before encoding ibexa_blurhash.encode.resize_original_width: 75 ibexa_blurhash.encode.resize_original_height: 75 # blurhash generated with 4x3 component, x and y component counts must be between 1 and 9 inclusive. ibexa_blurhash.encode.blurhash_x_count: 4 ibexa_blurhash.encode.blurhash_y_count: 3
Query blurhash data in GraphQL.
query { media { image(contentId: 19) { image { uri additionalData { blurhash } } } } }
Decode in browser
NOTE
Blurhash generates on image upload, so it will only be available for images uploaded after installation of this bundle.
Credits
- Algorithm authors - blurha.sh
- Inspired by symfony/ux-lazy-image