{"id":37236107,"url":"https://github.com/choowx/satori-php","last_synced_at":"2026-01-16T04:51:50.428Z","repository":{"id":65151072,"uuid":"584144550","full_name":"choowx/satori-php","owner":"choowx","description":"Run Satori — enlightened library to convert HTML and CSS to SVG, using PHP","archived":false,"fork":false,"pushed_at":"2026-01-12T07:32:55.000Z","size":541,"stargazers_count":17,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-14T14:49:47.562Z","etag":null,"topics":["convert","css","html","image","php","satori","satori-php","svg"],"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/choowx.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"choowx"}},"created_at":"2023-01-01T15:09:21.000Z","updated_at":"2026-01-12T07:32:52.000Z","dependencies_parsed_at":"2024-04-15T07:47:16.540Z","dependency_job_id":"b600dbef-0598-40a2-a1b3-bec9d19c5c77","html_url":"https://github.com/choowx/satori-php","commit_stats":{"total_commits":26,"total_committers":4,"mean_commits":6.5,"dds":"0.34615384615384615","last_synced_commit":"2da46a5f36346e4b6e8353c14f358c26a89384b8"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/choowx/satori-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choowx%2Fsatori-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choowx%2Fsatori-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choowx%2Fsatori-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choowx%2Fsatori-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/choowx","download_url":"https://codeload.github.com/choowx/satori-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choowx%2Fsatori-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28442364,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:55:22.719Z","status":"online","status_checked_at":"2026-01-15T02:00:08.019Z","response_time":62,"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":["convert","css","html","image","php","satori","satori-php","svg"],"created_at":"2026-01-15T04:11:39.910Z","updated_at":"2026-01-15T04:11:40.551Z","avatar_url":"https://github.com/choowx.png","language":"PHP","funding_links":["https://github.com/sponsors/choowx"],"categories":[],"sub_categories":[],"readme":"![Satori](https://raw.githubusercontent.com/vercel/satori/main/.github/card.png)\n\n# Run Satori — enlightened library to convert HTML and CSS to SVG, using PHP\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/choowx/satori-php.svg?style=flat-square)](https://packagist.org/packages/choowx/satori-php)\n[![Tests](https://img.shields.io/github/actions/workflow/status/choowx/satori-php/run-tests.yml?branch=main\u0026label=tests\u0026style=flat-square)](https://github.com/choowx/satori-php/actions/workflows/run-tests.yml)\n[![Total Downloads](https://img.shields.io/packagist/dt/choowx/satori-php.svg?style=flat-square)](https://packagist.org/packages/choowx/satori-php)\n\n[Satori](https://github.com/vercel/satori) — enlightened library to convert HTML and CSS to SVG.\n\nThis package makes it easy to run Satori using PHP.\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require choowx/satori-php\n```\n\nThis package relies on the `satori` and `html-react-parser` js packages being available on your system. In most cases you can accomplish this by issues these commands in your project.\n\n```bash\nnpm install satori\nnpm install html-react-parser\n```\n\n## Usage\n\n```php\nuse Choowx\\Satori\\Satori;\n\n$svg = Satori::html('\u003cdiv style=\"color: black\"\u003ehello, world\u003c/div\u003e')-\u003econvert();\n// $svg = '\u003csvg width=\"1200\" height=\"630\" viewBox=\"0 0 1200 630\" xmlns=\"http://www.w3.org/2000/svg\"\u003e\u003cpath fill=\"black\"...\n```\n\nThe width and height of the svg can be configured:\n\n```php\nuse Choowx\\Satori\\Satori;\n\n$svg = Satori::html('\u003cdiv style=\"color: black\"\u003ehello, world\u003c/div\u003e')\n    -\u003ewidth(600)\n    -\u003eheight(315)\n    -\u003econvert();\n// $svg = '\u003csvg width=\"600\" height=\"315\" viewBox=\"0 0 600 315\"...\n```\n\nUsing custom fonts available in the file system:\n\n\u003e Satori currently supports three font formats: TTF, OTF and WOFF. Note that WOFF2 is not supported at the moment.\n\n```php\nuse Choowx\\Satori\\Font;\nuse Choowx\\Satori\\Satori;\n\n$svg = Satori::html('\u003cdiv style=\"color: black\"\u003ehello, world\u003c/div\u003e')\n    -\u003ewithFonts([\n        Font::path('/path/to/Roboto-Regular.ttf')\n            -\u003ename('Roboto')\n            -\u003eweight(400)\n            -\u003estyle('regular'),\n        Font::path('/path/to/Roboto-Bold.ttf')\n            -\u003ename('Roboto')\n            -\u003eweight(700)\n            -\u003estyle('bold'),\n    ])\n    -\u003econvert();\n```\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](https://github.com/choowx/satori-php/blob/main/CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n- [Choo Wen Xuan](https://github.com/choowx)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchoowx%2Fsatori-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchoowx%2Fsatori-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchoowx%2Fsatori-php/lists"}