Download the PHP package geekcell/imagekit-bundle without Composer
On this page you can find all versions of the php package geekcell/imagekit-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download geekcell/imagekit-bundle
More information about geekcell/imagekit-bundle
Files in geekcell/imagekit-bundle
Package imagekit-bundle
Short Description A Symfony bundle for Imagekit integration
License MIT
Informations about the package imagekit-bundle
imagekit-bundle
A Symfony bundle for smooth integration with the PHP SDK for ImageKit.
Installation
To use this package, require it in your Symfony project with Composer.
Verify that the bundle has been enabled in config/bundles.php
Usage
This bundle uses the concept of "providers" to return an ImageKit asset. The recommended way to interact with providers is to configure them inside config/packages/geek_cell_imagekit.yaml
In the example above, we've defined two configurations called user_avatars
and user_profile_images
. Currently, the following settings are supported:
endpoint
- Custom endpoints configured in your ImageKit account.transformation
- Key-value pairs of transformations to apply to the asset. Click here the full list of supported transformations.signed
- Append a signature to your asset's URL.expires
- Expiration time in seconds; must be set ifsigned
is set totrue
.
If you're using autowiring in your Symfony project, you can then simply typehint GeekCell\ImagekitBundle\Imagekit\ProviderRegistry
in your services and/or controllers to inject a registry from which you can retrieve every configured provider by its name.
In a real-world application, of course, you would replace the hard-coded some-username.png
path with a path returned from some datastore that corresponds to the asset source(s) you've configured in your ImageKit account.
All versions of imagekit-bundle with dependencies
symfony/http-kernel Version ^6.0
symfony/dependency-injection Version ^6.0
symfony/config Version ^6.0
symfony/string Version ^6.0