{"id":13507428,"url":"https://github.com/trntv/yii2-glide","last_synced_at":"2025-05-12T03:31:40.959Z","repository":{"id":30017911,"uuid":"33566266","full_name":"trntv/yii2-glide","owner":"trntv","description":"Yii2 Glide integration component","archived":false,"fork":false,"pushed_at":"2019-08-12T14:14:55.000Z","size":862,"stargazers_count":41,"open_issues_count":5,"forks_count":21,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-06T16:01:47.115Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://github.com/trntv/yii2-starter-kit","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trntv.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":"2015-04-07T20:22:37.000Z","updated_at":"2025-03-15T20:57:53.000Z","dependencies_parsed_at":"2022-09-06T20:12:59.086Z","dependency_job_id":null,"html_url":"https://github.com/trntv/yii2-glide","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trntv%2Fyii2-glide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trntv%2Fyii2-glide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trntv%2Fyii2-glide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trntv%2Fyii2-glide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trntv","download_url":"https://codeload.github.com/trntv/yii2-glide/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253668053,"owners_count":21944967,"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-08-01T02:00:33.364Z","updated_at":"2025-05-12T03:31:40.492Z","avatar_url":"https://github.com/trntv.png","language":"PHP","funding_links":[],"categories":["Core components"],"sub_categories":[],"readme":"Yii2 Glide\n==========\nYii2 Glide integration.\n\u003e Glide is a wonderfully easy on-demand image manipulation library written in PHP.\n\nBefore you start read [Glide documentation](http://glide.thephpleague.com/) to understand what we are doing\n\nDemo\n----\nSince this package was created as a part of [yii2-starter-kit](https://github.com/trntv/yii2-starter-kit) it's demo can be found in starter kit demo.\n\nContributing\n-----------\nYou can contribute anything you found useful in any convenient way. Any help appreciated.\n\n\nInstallation\n------------\n\nThe preferred way to install this extension is through [composer](http://getcomposer.org/download/).\n\nEither run\n\n```\nphp composer.phar require --prefer-dist trntv/yii2-glide\n```\n\nor add\n\n```\n\"trntv/yii2-glide\": \"^1.0\"\n```\n\nto the require section of your `composer.json` file.\n\n\nUsage\n-----\n\nAdd glide configuration:\n\n```php\n'components' =\u003e [\n    ...\n    'glide' =\u003e [\n        'class' =\u003e 'trntv\\glide\\components\\Glide',\n        'sourcePath' =\u003e '@app/web/uploads',\n        'cachePath' =\u003e '@runtime/glide',\n        'signKey' =\u003e '\u003crandom-key\u003e' // \"false\" if you do not want to use HTTP signatures\n    ],\n    ...\n]\n```\n\nThen you can output modified image like so:\n```php\nYii::$app-\u003eglide-\u003eoutputImage('new-upload.jpg', ['w' =\u003e 100, 'fit' =\u003e 'crop'])\n```\n\nYou can also use ``trntv\\glide\\actions\\GlideAction`` to output images:\nIn any controller add (``SiteController`` for example):\n```php\npublic function actions()\n{\n    return [\n        'glide' =\u003e 'trntv\\glide\\actions\\GlideAction'\n    ]\n}\n```\nThan use it:\n``/index.php?r=site/glide?path=new-upload.jpg\u0026w=100\u0026h=75``\n\nExample\n-------\nComplex Glide integration example can be found [here](https://github.com/trntv/yii2-starter-kit/tree/master/storage)\n\n\n\nSecure Urls\n-----------\nTBD\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrntv%2Fyii2-glide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrntv%2Fyii2-glide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrntv%2Fyii2-glide/lists"}