{"id":21638783,"url":"https://github.com/novactive/novaezcloudinarybundle","last_synced_at":"2025-04-11T16:51:14.372Z","repository":{"id":57028645,"uuid":"95617325","full_name":"Novactive/NovaeZCloudinaryBundle","owner":"Novactive","description":"Novactive eZ Cloudinary Bundle is an eZPlatform bundle for Images optimizations and manipulations.","archived":false,"fork":false,"pushed_at":"2022-08-19T07:27:31.000Z","size":35,"stargazers_count":3,"open_issues_count":0,"forks_count":5,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-25T12:53:33.842Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Novactive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-28T01:47:33.000Z","updated_at":"2022-09-03T16:48:04.000Z","dependencies_parsed_at":"2022-08-23T16:20:46.495Z","dependency_job_id":null,"html_url":"https://github.com/Novactive/NovaeZCloudinaryBundle","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Novactive%2FNovaeZCloudinaryBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Novactive%2FNovaeZCloudinaryBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Novactive%2FNovaeZCloudinaryBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Novactive%2FNovaeZCloudinaryBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Novactive","download_url":"https://codeload.github.com/Novactive/NovaeZCloudinaryBundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248442988,"owners_count":21104312,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-25T04:11:39.309Z","updated_at":"2025-04-11T16:51:14.343Z","avatar_url":"https://github.com/Novactive.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Novactive eZ Cloudinary Bundle\n\n----\n\nThis repository is what we call a \"subtree split\": a read-only copy of one directory of the main repository. \nIt is used by Composer to allow developers to depend on specific bundles.\n\nIf you want to report or contribute, you should instead open your issue on the main repository: https://github.com/Novactive/Nova-eZPlatform-Bundles\n\nDocumentation is available in this repository via `.md` files but also packaged here: https://novactive.github.io/Nova-eZPlatform-Bundles/master/CloudinaryBundle/README.md.html\n\n----\n\n[![Downloads](https://img.shields.io/packagist/dt/novactive/ezcloudinarybundle.svg?style=flat-square)](https://packagist.org/packages/novactive/ezcloudinarybundle)\n[![Latest version](https://img.shields.io/github/release/Novactive/NovaeZCloudinaryBundle.svg?style=flat-square)](https://github.com/Novactive/NovaeZCloudinaryBundle/releases)\n[![License](https://img.shields.io/packagist/l/novactive/ezcloudinarybundle.svg?style=flat-square)](LICENSE)\n\nNovactive eZ Cloudinary Bundle is an eZPlatform bundle for Images optimizations and manipulations.\n\nThis bundle brings the power of [Cloudinary](https://demo.cloudinary.com/?mode=default) in your eZ Platform project.\n\nFor this first version, the plugin allows you to define Cloudinary Variation on top of eZ Variations.\nImages stay on your servers but the SRC is adapted to make Cloudinary rendering/manipulating images.\n\n\u003e All the configuration is SiteAccessAware then you can have different one depending on the SiteAccess\n\n## INSTALL\n\n### Use Composer\n\nAdd the lib to your composer.json, run `composer require novactive/ezcloudinarybundle` to refresh dependencies.\n\nThen inject the bundle in the `bundles.php` of your application.\n\n```php\n    Novactive\\Bundle\\eZCloudinaryBundle\\NovaeZCloudinaryBundle::class =\u003e [ 'all'=\u003e true ],\n```\n\n### Setup your credentials\n\n```yaml\nnova_ezcloudinary:\n    authentification:\n        cloud_name: 'demo'\n        api_key: \"xxxxx\"\n        api_secret: \"xxxx\"\n```\n\n## Usage\n\nThis bundle mimics the native image variation system.\n\n```yaml\nparameters:\n    nova_ezcloudinary.default.cloudinary_variations:\n            simpletest1:\n                ezreference_variation: 'Native eZ Variation Name, ~ means original'\n                filters: # look at the documentation on Cloudinary\n                    width: 200\n                    height: 200\n                    gravity: 'face'\n                    radius: 'max'\n                    effect: 'sepia'\n            simpletest2: # look at the documentation on Cloudinary\n                ezreference_variation: 'medium' # Cloudinary manipulation are going to be base on the medium alias\n                filters: # look at the documentation on Cloudinary\n                    transformation:\n                        width: 300\n                        height: 300\n                        effect: 'sepia'\n                        radius: 'max'\n                        fetch_format: 'auto'\n                        angle: 45\n\n```\n\nIn your template\n\n```twig\n    {{ ez_render_field( content, \"image\",{\n        \"parameters\": {\"alias\": 'simpletest2'},\n        \"attr\" : { \"class\" : \"img-responsive\" }\n    }\n    ) }}\n```\n\nAutomatically, `nova_ezcloudinary_alias` will be used instead of `ez_image_alias`.\nThe bundle fallback on the native Variation system if the alias name does not exist in `cloudinary_variations`\n\nThen basically there is no change in your code, just yaml configuration for your Variation.\n\n\u003e if you have overrided the content_fields, be sure to update the call to `nova_ezcloudinary_alias`\n\n\n### Chained Transformations\nChained transformations can be done by adding an array to the configuration like so:\n```yaml \nfilters:\n  transformation:\n    - secure: 'true'\n      crop: 'crop'\n      height: 823\n      width: 1920\n      quality: 'auto:best'\n    - crop: 'crop'\n      y: 0\n      x: 415\n      width: 1234\n      height: 823\n      quality: 'auto:best'\n    - crop: 'scale'\n      width: 537\n      height: 358\n      aspect_ratio: '3:2'\n      quality: 'auto:eco'\n```\n\n## Local mode\n\nThis bundle uses the fetch mode of Cloudinary, then images have to be \"reachable\" to be converted.\nBUT, obviously your localhost is not public, to bypass that situation, we recommand the usage of `ngrok`\n\nLet's assume your webserver listen on the TCP port 42080\n```bash\n$ ngrok http 42080\n```\n\nYou will get something like:  `http://xxxxx.ngrok.io`\nAnd you can set up that in the configuration:\n\n```yaml\nparameters:\n    nova_ezcloudinary.default.cloudinary_fecth_proxy:\n        host: xxxxx.ngrok.io\n```\n\n\u003e you can do your own tunnel, here, but `ngrok` is really good at it\n\n## Local mode without Cloudinary\n\nYou can also disable all Cloudinary variations for you local usages, using only native ezplatform variation:\n\n```yaml\nparameters:\n    nova_ezcloudinary.default.cloudinary_disabled: true\n    nova_ezcloudinary.default.cloudinary_fallback_variation: original # Will replace all unknown variation by original\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnovactive%2Fnovaezcloudinarybundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnovactive%2Fnovaezcloudinarybundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnovactive%2Fnovaezcloudinarybundle/lists"}