{"id":36278436,"url":"https://github.com/geckon01/simple-image-compressor","last_synced_at":"2026-01-11T09:00:40.458Z","repository":{"id":148846782,"uuid":"621028875","full_name":"Geckon01/simple-image-compressor","owner":"Geckon01","description":"SimpleImageCompressor is a tiny simple PHP image resizer/compressor lib which allows you to resize and compress any image easily on the fly.","archived":false,"fork":false,"pushed_at":"2025-07-23T21:40:49.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-03T23:34:27.730Z","etag":null,"topics":["composer-library","image-resize","php","php-image-resizer","php-library"],"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/Geckon01.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-03-29T21:11:24.000Z","updated_at":"2025-07-23T21:40:53.000Z","dependencies_parsed_at":"2025-07-23T23:18:07.338Z","dependency_job_id":"5a2241db-536b-4453-8ee5-b01f0387a4e9","html_url":"https://github.com/Geckon01/simple-image-compressor","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Geckon01/simple-image-compressor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Geckon01%2Fsimple-image-compressor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Geckon01%2Fsimple-image-compressor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Geckon01%2Fsimple-image-compressor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Geckon01%2Fsimple-image-compressor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Geckon01","download_url":"https://codeload.github.com/Geckon01/simple-image-compressor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Geckon01%2Fsimple-image-compressor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28298875,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T08:21:30.231Z","status":"ssl_error","status_checked_at":"2026-01-11T08:21:26.882Z","response_time":60,"last_error":"SSL_read: 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":["composer-library","image-resize","php","php-image-resizer","php-library"],"created_at":"2026-01-11T09:00:22.234Z","updated_at":"2026-01-11T09:00:40.391Z","avatar_url":"https://github.com/Geckon01.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n# SimpleImageCompressor\n\n\n![Version](https://img.shields.io/packagist/v/geckon01/simple-image-compressor)\n![Lecense](https://img.shields.io/badge/license-MIT-green)\n![Downloads](https://img.shields.io/packagist/dt/geckon01/simple-image-compressor)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/d773335a657d467faaa0ebb12bc2abe1)](https://app.codacy.com/gh/Geckon01/simple-image-compressor/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade)\n\n**SimpleImageCompressor** - is a tiny simple PHP image resizer lib which allows you to resize and compress any image easily on the fly.\n\n## Installation\n\n### With composer\n```bash\ncomposer require \"geckon01/simple-image-compressor\"\n```\n\n### Without composer\n\n 1. Download latest release [here](https://github.com/Geckon01/simple-image-compressor/releases).\n 2. Unpack the archive to your project directory.\n 3. Include the library files:\n\n```php\nrequire \"src/SimpleImageCompressor.php\";  \nrequire \"src/CompressedImage.php\";\nuse geckon01\\SimpleImageCompressor\\SimpleImageCompressor;\n```\n\n## Usage\n\nResize and compress an image:\n```php\n$resolutionTargetPercent = 50;\n$targetQuality = 50;\n$compressor = SimpleImageCompressor::load(\"image.png\");\n$compressedImage = $compressor-\u003eresizeAndCompress($resolutionTargetPercent, $targetQuality);\n$compressedImage-\u003etoFile(\"image\");\n```\nload method supports loading from local file, or you can specify any valid URL image link like this:\n```php\n$compressor = SimpleImageCompressor::load(\"https://example.com/image.jpg\");\n```\nMethod chaining is supported:\n```php\nSimpleImageCompressor::load(\"image.png\")\n\t-\u003eresizeAndCompress(50, 50)\n\t-\u003etoFile(\"image\");\n```\n\u003e Note: File extensions are automatically added. Use toFile(\"filename\") without extension.\n\n### Output format\nYou can specify output format. Supported output fomats are:\n\n```php \n$compressedImage-\u003etoFile(\"image\");\n```\n```php \n$compressedImage-\u003etoBase64();\n```\n```php \n$compressedImage-\u003etoGdImage();\n```\n### Size Constraints\nSet approximate minimum dimensions (aspect ratio preserved): \n```php \n$compressor-\u003esetApproxMinimumHeight(500);  \n$compressor-\u003esetApproxMinimumWidth(500);\n```\n\u003e Note actual dimensions may differ due to aspect ratio preservation.\nExample: 1920×1080 image reduced to 50% becomes 960×540 (maintaining 16:9).\n\n## License\n\nThis software is licensed under the MIT License. [View the license](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeckon01%2Fsimple-image-compressor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeckon01%2Fsimple-image-compressor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeckon01%2Fsimple-image-compressor/lists"}