{"id":43146751,"url":"https://github.com/php-collective/file-storage-image-processor","last_synced_at":"2026-01-31T23:48:24.624Z","repository":{"id":207091104,"uuid":"718407563","full_name":"php-collective/file-storage-image-processor","owner":"php-collective","description":"Image Processing for php-collective/file-storage","archived":false,"fork":false,"pushed_at":"2025-11-06T22:27:30.000Z","size":386,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-07T00:13:41.237Z","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/php-collective.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-11-14T02:23:42.000Z","updated_at":"2025-11-06T22:27:45.000Z","dependencies_parsed_at":"2023-11-17T00:12:12.480Z","dependency_job_id":"c0b6941f-a0dc-40da-99c9-f7f7a9f85a04","html_url":"https://github.com/php-collective/file-storage-image-processor","commit_stats":{"total_commits":41,"total_committers":6,"mean_commits":6.833333333333333,"dds":0.7073170731707317,"last_synced_commit":"0a0cac5850b82ae493cf48622484123fe0aac022"},"previous_names":["php-collective/file-storage-image-processor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/php-collective/file-storage-image-processor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-collective%2Ffile-storage-image-processor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-collective%2Ffile-storage-image-processor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-collective%2Ffile-storage-image-processor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-collective%2Ffile-storage-image-processor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/php-collective","download_url":"https://codeload.github.com/php-collective/file-storage-image-processor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-collective%2Ffile-storage-image-processor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28961124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T23:03:11.038Z","status":"ssl_error","status_checked_at":"2026-01-31T22:56:44.691Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-01-31T23:48:23.868Z","updated_at":"2026-01-31T23:48:24.617Z","avatar_url":"https://github.com/php-collective.png","language":"PHP","funding_links":[],"categories":["Plugins"],"sub_categories":["Imagery"],"readme":"# File Storage Image Processing\r\n\r\n[![CI](https://github.com/php-collective/file-storage-image-processor/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/php-collective/file-storage-image-processor/actions/workflows/ci.yml)\r\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)\r\n\r\nImage Processing for the [File Storage Library](https://github.com/php-collective/file-storage).\r\n\r\nBuilt on top of [Intervention Image v3](https://image.intervention.io/v3).\r\n\r\n## Features\r\n\r\n * Manipulates images and produces variants of the original image and stores them\r\n * Supports multiple image operations: resize, scale, crop, rotate, flip, sharpen, and more\r\n * Optimizes image file size using [spatie/image-optimizer](https://github.com/spatie/image-optimizer)\r\n * Works with League Flysystem for flexible storage backends\r\n * Fluent API for chaining image operations\r\n\r\n## Requirements\r\n\r\n- PHP 8.1 or higher\r\n- GD or Imagick extension\r\n- Intervention Image v3\r\n\r\n## Installation\r\n\r\n```sh\r\ncomposer require php-collective/file-storage-image-processor\r\n```\r\n\r\n## Quick Example\r\n\r\n```php\r\nuse PhpCollective\\Infrastructure\\Storage\\Processor\\Image\\ImageVariantCollection;\r\n\r\n$collection = ImageVariantCollection::create();\r\n\r\n// Create a thumbnail with aspect ratio preserved\r\n$collection-\u003eaddNew('thumbnail')\r\n    -\u003escale(300, 300)\r\n    -\u003eoptimize();\r\n\r\n// Create a specific-sized avatar\r\n$collection-\u003eaddNew('avatar')\r\n    -\u003ecover(150, 150)\r\n    -\u003eoptimize();\r\n\r\n$file = $file-\u003ewithVariants($collection-\u003etoArray());\r\n$file = $imageProcessor-\u003eprocess($file);\r\n```\r\n\r\n## Documentation\r\n\r\nPlease start by reading the documentation in the [docs/](/docs/readme.md) directory:\r\n\r\n- [Installation \u0026 Setup](/docs/Installation-and-Setup.md)\r\n- [Processing Images](/docs/Processing-Images.md)\r\n- [Available Operations](/docs/Available-Operations.md) - Complete reference of all image operations\r\n\r\n## Upgrade from v2\r\n\r\nThis package uses **Intervention Image v3**, which has breaking changes from v2:\r\n\r\n- `ImageManager` now requires a Driver instance instead of array configuration\r\n- The `resize()` method no longer has an `aspectRatio` parameter\r\n- Use `scale()` for aspect ratio preservation (recommended for most cases)\r\n- Use `resize()` only when you need exact dimensions (may distort image)\r\n\r\nSee the [Available Operations](/docs/Available-Operations.md) documentation for detailed examples.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-collective%2Ffile-storage-image-processor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphp-collective%2Ffile-storage-image-processor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-collective%2Ffile-storage-image-processor/lists"}