{"id":15068599,"url":"https://github.com/leongrdic/php-imgman","last_synced_at":"2025-07-24T00:38:13.064Z","repository":{"id":45728089,"uuid":"452434355","full_name":"leongrdic/php-imgman","owner":"leongrdic","description":"image processing library that can downscale, compress and convert images using PHP-GD native functions","archived":false,"fork":false,"pushed_at":"2023-04-15T23:23:48.000Z","size":9,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-14T18:51:00.788Z","etag":null,"topics":["compress-images","image-processing","php","php-gd","php8","thumbnail"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leongrdic.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-01-26T20:44:26.000Z","updated_at":"2024-08-08T20:54:06.000Z","dependencies_parsed_at":"2024-09-29T14:00:31.427Z","dependency_job_id":"4ab9dc64-828d-4d87-9fb2-222a70da7d40","html_url":"https://github.com/leongrdic/php-imgman","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"f218ab9069b7c296a9f2a8e82b4269a45b0edc57"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/leongrdic/php-imgman","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leongrdic%2Fphp-imgman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leongrdic%2Fphp-imgman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leongrdic%2Fphp-imgman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leongrdic%2Fphp-imgman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leongrdic","download_url":"https://codeload.github.com/leongrdic/php-imgman/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leongrdic%2Fphp-imgman/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265552825,"owners_count":23786966,"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":["compress-images","image-processing","php","php-gd","php8","thumbnail"],"created_at":"2024-09-25T01:38:27.481Z","updated_at":"2025-07-24T00:38:13.026Z","avatar_url":"https://github.com/leongrdic.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# imgman\n\nThis library uses GD and EXIF (optional) PHP extensions so make sure you have them installed.\n\nIt also uses the latest PHP 8.1 features and backwards compatibility isn't yet supported.\n\n## Install:\n```\ncomposer require leongrdic/imgman\n```\n\n```php\nuse \\Le\\ImgMan\\{ImgMan, ImageFormat};\n```\n\n## Supported formats\n### Input\n- any image format supported by php-gd\n\nInput methods: `fromDataUrl()`, `fromString()`, `fromFile()`\n\n### Output\n\nCall the `output()` method with the wanted output format:\n- `ImageFormat::jpeg`\n- `ImageFormat::png`\n- `ImageFormat::webp` (make sure your php-gd is configured to work with webp)\n\nAfter that use: `toDataUrl()`, `toString()`, `toFile()`\n\n## Example usages\n```php\n$rawImageBytes = (new ImgMan)\n    -\u003efromDataUrl($dataUrlFromJS)\n    -\u003ecacheExif()\n    -\u003edownscale(2048)\n    -\u003erotateFromExif() // rotating after downscaling should use less memory and be a bit faster\n    -\u003eoutput(ImageFormat::jpeg, quality: 75)\n    -\u003etoString();\n```\n\n```php\n(new ImgMan)\n    -\u003efromFile('example.png')\n    -\u003edownscale(1920, 1080)\n    -\u003eoutput(ImageFormat::png)\n    -\u003etoFile(); // use input filename (replace original file)\n```\n\n```php\n$dataUrl = (new ImgMan)\n    -\u003efromString($rawImageBytes)\n    -\u003eoutput(ImageFormat::webp, quality: 80)\n    -\u003etoDataUrl();\n```\n\n# Notice\n\nThis library hasn't yet been fully tested and is to be used at your own responsibility.\nAny feedback and improvement suggestions are appreciated!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleongrdic%2Fphp-imgman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleongrdic%2Fphp-imgman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleongrdic%2Fphp-imgman/lists"}