{"id":13411486,"url":"https://github.com/daxslab/yii2-thumbnailer","last_synced_at":"2025-07-30T22:30:51.367Z","repository":{"id":29243899,"uuid":"116883361","full_name":"daxslab/yii2-thumbnailer","owner":"daxslab","description":"Yii2 extension to generate thumbnails for images of any size","archived":false,"fork":false,"pushed_at":"2024-06-25T09:23:58.000Z","size":22,"stargazers_count":9,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-19T17:05:36.581Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/daxslab.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-09T23:38:15.000Z","updated_at":"2022-01-21T12:04:33.000Z","dependencies_parsed_at":"2024-10-26T07:57:39.132Z","dependency_job_id":"5f41d21c-4e1a-444e-886b-38ecf935a9d9","html_url":"https://github.com/daxslab/yii2-thumbnailer","commit_stats":{"total_commits":19,"total_committers":5,"mean_commits":3.8,"dds":0.5263157894736843,"last_synced_commit":"2eec94e574dc50ce0aa2158634254e702d3d2b5a"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/daxslab/yii2-thumbnailer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daxslab%2Fyii2-thumbnailer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daxslab%2Fyii2-thumbnailer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daxslab%2Fyii2-thumbnailer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daxslab%2Fyii2-thumbnailer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daxslab","download_url":"https://codeload.github.com/daxslab/yii2-thumbnailer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daxslab%2Fyii2-thumbnailer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267953580,"owners_count":24171419,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-07-30T20:01:14.007Z","updated_at":"2025-07-30T22:30:50.918Z","avatar_url":"https://github.com/daxslab.png","language":"PHP","funding_links":[],"categories":["Web Development"],"sub_categories":["PHP"],"readme":"Yii2 Thumbnailer\n================\n\n[![Build Status](https://secure.travis-ci.org/daxslab/yii2-thumbnailer.png)](http://travis-ci.org/daxslab/yii2-thumbnailer)\n[![Latest Stable Version](https://poser.pugx.org/daxslab/yii2-thumbnailer/v/stable.svg)](https://packagist.org/packages/daxslab/yii2-thumbnailer)\n[![Total Downloads](https://poser.pugx.org/daxslab/yii2-thumbnailer/downloads)](https://packagist.org/packages/daxslab/yii2-thumbnailer)\n[![Latest Unstable Version](https://poser.pugx.org/daxslab/yii2-thumbnailer/v/unstable.svg)](https://packagist.org/packages/daxslab/yii2-thumbnailer)\n[![License](https://poser.pugx.org/daxslab/yii2-thumbnailer/license.svg)](https://packagist.org/packages/daxslab/yii2-thumbnailer)\n\nYii2 component to generate image thumnails of any size.\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 daxslab/yii2-thumbnailer \"*\"\n```\n\nor add\n\n```\n\"daxslab/yii2-thumbnailer\": \"*\"\n```\n\nto the require section of your `composer.json` file.\n\nConfiguration\n-------------\n\nThe basic configuration only requires adding the component to the application:\n\n```php\n'components' =\u003e [\n    //...\n    'thumbnailer' =\u003e [\n        'class' =\u003e 'daxslab\\thumbnailer\\Thumbnailer',\n    ],\n    //...\n]\n```\n\nBesides that a default value is always provided, all the options can be configured.\n\n```php\n'components' =\u003e [\n    //...\n    'thumbnailer' =\u003e [\n        'class' =\u003e 'daxslab\\thumbnailer\\Thumbnailer',\n        'defaultWidth' =\u003e 500,\n        'defaultHeight' =\u003e 500,\n        'thumbnailsBasePath' =\u003e '@webroot/assets/thumbs',\n        'thumbnailsBaseUrl' =\u003e '@web/assets/thumbs',\n        'enableCaching' =\u003e true, //defaults to false but is recommended\n    ],\n    //...\n]\n```\n\nUsage\n-----\n\nOnce the extension is configured, simply use it in your views by:\n\n```php\n//Generates thumbnail with default values specified in the configuration\nHtml::img(Yii::$app-\u003ethumbnailer-\u003eget($imageUrl));\n\n//Generates a 400px width thumbnail. The height is determined as the width because is not set. \nHtml::img(Yii::$app-\u003ethumbnailer-\u003eget($imageUrl, 400));\n\n//Generates a 400x400 pixels thumbnail and 60% quality \nHtml::img(Yii::$app-\u003ethumbnailer-\u003eget($imageUrl, 400, 400));\n\n//Generates a 400x400 pixels thumbnail and 10% quality\nHtml::img(Yii::$app-\u003ethumbnailer-\u003eget($imageUrl, 400, 400, 10));\n\n//Generates a 400x400 pixels thumbnail, 10% quality and not cropping the image\n//but inserting it into a box with the specified dimensions.\nHtml::img(Yii::$app-\u003ethumbnailer-\u003eget($imageUrl, 400, 400, 10, ManipulatorInterface::THUMBNAIL_INSET));\n```\n\nProudly made by [Daxslab](http://daxslab.com).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaxslab%2Fyii2-thumbnailer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaxslab%2Fyii2-thumbnailer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaxslab%2Fyii2-thumbnailer/lists"}