{"id":21542624,"url":"https://github.com/alexantr/image-resize","last_synced_at":"2025-04-10T04:25:08.513Z","repository":{"id":56944405,"uuid":"44444331","full_name":"alexantr/image-resize","owner":"alexantr","description":"Image resizing library","archived":false,"fork":false,"pushed_at":"2022-11-11T14:42:09.000Z","size":1124,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T04:04:40.332Z","etag":null,"topics":["crop","gd","image-processing","images","imagick","php","thumbnails"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"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/alexantr.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-10-17T16:08:34.000Z","updated_at":"2025-01-21T19:42:24.000Z","dependencies_parsed_at":"2023-01-21T15:15:34.158Z","dependency_job_id":null,"html_url":"https://github.com/alexantr/image-resize","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexantr%2Fimage-resize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexantr%2Fimage-resize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexantr%2Fimage-resize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexantr%2Fimage-resize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexantr","download_url":"https://codeload.github.com/alexantr/image-resize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248156127,"owners_count":21056778,"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":["crop","gd","image-processing","images","imagick","php","thumbnails"],"created_at":"2024-11-24T05:10:09.573Z","updated_at":"2025-04-10T04:25:08.491Z","avatar_url":"https://github.com/alexantr.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ImageResize\n\nImage resizing library. Creates images on demand using GD.\n\n## Install\n\nInstall through [Composer](http://getcomposer.org/):\n\n```\ncomposer require alexantr/image-resize\n```\n\n## Examples\n\nSee full list of examples in `example` folder.\n\nCreating URLs:\n\n```php\nuse Alexantr\\ImageResize\\Image;\n\n$src1 = Image::init('uploads/pic.jpg')-\u003ecrop(200, 200);\n$src2 = Image::init('uploads/pic.jpg')-\u003esilhouette()-\u003equality(95)-\u003efit(200, 200);\n$src3 = Image::init('uploads/pic.jpg')-\u003efitWidth(200);\n$src4 = Image::init('uploads/pic.jpg')-\u003efitHeight(200);\n$src5 = Image::init('/site/uploads/pic.jpg')-\u003ebgColor('6af')-\u003efill(200, 200);\n```\n\nCan use class member access on instantiation in PHP 5.4 or higher:\n\n```\n\u003cimg src=\"\u003c?= (new Image('uploads/pic.jpg'))-\u003ecrop(200, 200) ?\u003e\" alt=\"\"\u003e\n```\n\n## Creator example\n\nApache `.htacces` file:\n\n```\nRewriteEngine On\nRewriteCond %{REQUEST_FILENAME} !-f\nRewriteCond %{REQUEST_FILENAME} !-d\nRewriteRule ^resized/(.*)$ image.php?path=$1 [L]\n```\n\n`image.php` in web root folder:\n\n```php\nrequire '../vendor/autoload.php';\n\n$webroot = __DIR__;\n$path = isset($_GET['path']) ? $_GET['path'] : '';\n\nAlexantr\\ImageResize\\Creator::create($webroot, $path);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexantr%2Fimage-resize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexantr%2Fimage-resize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexantr%2Fimage-resize/lists"}