deuxhuithuit / craft-cloudflare-images
Upload your images assets to Cloudflare Images from Craft CMS assets interface. It exposes the a file system and supports craft image transforms.
Installs: 38
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 1
Type:craft-plugin
Requires
- php: ^8.2|^8.3
- craftcms/cms: ^5.0.0
Requires (Dev)
- craftcms/ecs: dev-main
- craftcms/phpstan: dev-main
- friendsofphp/php-cs-fixer: ^3.35
- squizlabs/php_codesniffer: ^3.7
README
This plugin offers a easy way to upload your images assets to Cloudflare Images from Craft CMS assets interface. It exposes the a file system and supports craft image transforms.
Installation:
- Install with composer
composer require deuxhuithuit/craft-cloudflare-images
- Install in craft
craft plugin/install cloudflare-images
-
Add your account id, account hash and api token in the settings. Those can be found in your Cloudflare dashboard. We recommend to use env vars for this.
-
Go in craft and create a new File System using the Cloudflare Image FS. Also create a new Volume that uses this FS. It can be used as the main FS, or simply as a transform FS in an existing Volume.
-
Make sure Flexible Variants are enabled in your Cloudflare dashboard (see https://developers.cloudflare.com/images/cloudflare-images/transform/flexible-variants/)
-
Profit!
Made with ❤️ in Montréal.
(c) Deux Huit Huit