{"id":49513324,"url":"https://github.com/optidash-ai/optidash-php","last_synced_at":"2026-05-01T21:05:52.282Z","repository":{"id":57032521,"uuid":"263746359","full_name":"optidash-ai/optidash-php","owner":"optidash-ai","description":"The official PHP integration for Optidash API","archived":false,"fork":false,"pushed_at":"2021-02-04T11:37:10.000Z","size":166,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-19T22:48:27.242Z","etag":null,"topics":["image-analysis","image-manipulation","image-optimization","image-processing","image-resizing","optidash"],"latest_commit_sha":null,"homepage":"https://docs.optidash.ai","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/optidash-ai.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":"2020-05-13T21:24:38.000Z","updated_at":"2021-07-14T06:59:31.000Z","dependencies_parsed_at":"2022-08-23T20:50:23.618Z","dependency_job_id":null,"html_url":"https://github.com/optidash-ai/optidash-php","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/optidash-ai/optidash-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/optidash-ai%2Foptidash-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/optidash-ai%2Foptidash-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/optidash-ai%2Foptidash-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/optidash-ai%2Foptidash-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/optidash-ai","download_url":"https://codeload.github.com/optidash-ai/optidash-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/optidash-ai%2Foptidash-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32512716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["image-analysis","image-manipulation","image-optimization","image-processing","image-resizing","optidash"],"created_at":"2026-05-01T21:05:51.718Z","updated_at":"2026-05-01T21:05:52.269Z","avatar_url":"https://github.com/optidash-ai.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003ca href=\"https://optidash.ai\"\u003e\u003cimg src=\"media/logotype.png\" alt=\"Optidash\" width=\"143\" height=\"45\"/\u003e\u003c/a\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\nOptidash is a modern, AI-powered image optimization and processing API.\u003cbr\u003eWe will drastically speed-up your websites and save you money on bandwidth and storage.\n\u003c/p\u003e\n\n---\n\u003cp align=\"center\"\u003e\n\u003cstrong\u003eThe official PHP integration for the Optidash API.\u003c/strong\u003e\u003cbr\u003e\n\u003cbr\u003e\n\u003cimg src=\"https://img.shields.io/github/issues-raw/optidash-ai/optidash-php?style=flat\u0026color=success\"/\u003e\n\u003cimg src=\"https://img.shields.io/packagist/l/optidash-ai/optidash-php?style=flat\u0026color=success\"/\u003e\n\u003cimg src=\"https://img.shields.io/twitter/follow/optidashAI?label=Follow%20Us\u0026style=flat\u0026color=success\u0026logo=twitter\"/\u003e\n\u003c/p\u003e\n\n---\n\n### Documentation\nSee the [Optidash API docs](https://docs.optidash.ai).\n\n### Installation\n```bash\n$ composer require optidash/optidash\n```\n\n### Quick examples\nOptidash API enables you to provide your images for processing in two ways - by uploading them directly to the API ([Image Upload](https://docs.optidash.ai/requests/image-upload)) or by providing a publicly available image URL ([Image Fetch](https://docs.optidash.ai/requests/image-fetch)).\n\nYou may also choose your preferred [response method](https://docs.optidash.ai/introduction#choosing-response-method-and-format) on a per-request basis. By default, the Optidash API will return a [JSON response](https://docs.optidash.ai/responses/json-response-format) with rich metadata pertaining to input and output images. Alternatively, you can use [binary responses](https://docs.optidash.ai/responses/binary-responses). When enabled, the API will respond with a full binary representation of the resulting (output) image. This PHP integration exposes two convenience methods for interacting with binary responses: `toFile()` and `toBuffer()`.\n\n#### Image upload\nHere is a quick example of uploading a local file for optimization and processing. It calls `toJSON()` at a final step and instructs the API to return a JSON response.\n\n```php\n\u003c?php\n\n// Pass your Optidash API Key to the constructor\n$opti = new Optidash\\Optidash('your-api-key');\n\n// Upload an image from disk, resize it to 100 x 75,\n// automatically enhance, and adjust sharpness parameter.\n$opti\n    -\u003eupload('path/to/input.jpg')\n    -\u003eoptimize(array(\n        'compression' =\u003e 'medium'\n    ))\n    -\u003eresize(array(\n        'width' =\u003e 100,\n        'height' =\u003e 75\n    ))\n    -\u003eauto(array(\n        'enahnce' =\u003e true\n    ))\n    -\u003eadjust(array(\n        'unsharp' =\u003e 10\n    ))\n    -\u003etoJSON(function ($error, $meta) {\n        if (!empty($error)) {\n            throw new Exception($error);\n        }\n\n        // You'll find the full JSON metadata within the `meta` variable\n    });\n```\n\n#### Image fetch\nIf you already have your source visuals publicly available online, we recommend using Image Fetch by default. That way you only have to send a JSON payload containing image URL and processing steps. This method is also much faster than uploading a full binary representation of the image.\n\n```php\n\u003c?php\n\n// Pass your Optidash API Key to the constructor\n$opti = new Optidash\\Optidash('your-api-key');\n\n// Provide a publicly available image URL with `fetch()` method,\n// apply Gaussian blur using highly optimized PNG as the output format.\n// We'll also use `toFile()` method and stream the output image to disk\n$opti\n    -\u003efetch('https://www.website.com/image.jpg')\n    -\u003eoptimize(array(\n        'compression' =\u003e 'medium'\n    ))\n    -\u003efilter(array(\n        'blur' =\u003e array(\n            'mode' =\u003e 'gaussian',\n            'value' =\u003e 10\n        )\n    ))\n    -\u003eoutput(array(\n        'format' =\u003e 'png'\n    ))\n    -\u003etoFile('path/to/output.png', function ($error, $meta) {\n        if (!empty($error)) {\n            throw new Exception($error);\n        }\n\n        // You'll find the full JSON metadata within the `meta` variable\n    });\n```\n\n### License\nThis software is distributed under the MIT License. See the [LICENSE](LICENSE) file for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foptidash-ai%2Foptidash-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foptidash-ai%2Foptidash-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foptidash-ai%2Foptidash-php/lists"}