{"id":49553012,"url":"https://github.com/avvertix/html-shot","last_synced_at":"2026-05-03T00:31:36.115Z","repository":{"id":353031693,"uuid":"1216817126","full_name":"avvertix/html-shot","owner":"avvertix","description":"HTML to image rendering for PHP, powered by Rust and Takumi. Generate Open Graph images and more from HTML/CSS without requiring a headless browser.","archived":false,"fork":false,"pushed_at":"2026-04-22T06:52:15.000Z","size":311,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-22T08:10:21.778Z","etag":null,"topics":["html-to-image","open-graph","php"],"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/avvertix.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"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}},"created_at":"2026-04-21T09:04:10.000Z","updated_at":"2026-04-22T06:52:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/avvertix/html-shot","commit_stats":null,"previous_names":["avvertix/html-shot"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/avvertix/html-shot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avvertix%2Fhtml-shot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avvertix%2Fhtml-shot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avvertix%2Fhtml-shot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avvertix%2Fhtml-shot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avvertix","download_url":"https://codeload.github.com/avvertix/html-shot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avvertix%2Fhtml-shot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32554062,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T00:31:16.350Z","status":"ssl_error","status_checked_at":"2026-05-03T00:31:15.546Z","response_time":132,"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":["html-to-image","open-graph","php"],"created_at":"2026-05-03T00:31:35.529Z","updated_at":"2026-05-03T00:31:36.110Z","avatar_url":"https://github.com/avvertix.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# html-shot\n\nHTML to image rendering for PHP, powered by Rust and [Takumi](https://github.com/kane50613/takumi).\nGenerate Open Graph images and more from HTML/CSS without headless browser overhead.\n\n## Features\n\n_tbd_\n\n\n### HTML \u0026 CSS Support\n\n| Input | Behaviour |\n|-------|-----------|\n| `\u003cstyle\u003e` tags | CSS extracted and applied as a stylesheet |\n| Inline `style=\"...\"` | Promoted to a generated CSS class rule |\n| `\u003cimg src=\"...\"\u003e` | Local paths and data URIs supported |\n| CSS `background-image: url(...)` | Local paths and data URIs supported |\n| `\u003cbr\u003e` | Rendered as a newline |\n| `\u003chtml\u003e`, `\u003chead\u003e`, `\u003cbody\u003e` | Transparent wrappers, stripped |\n| All other elements | Rendered as Takumi container nodes (`class`, `id`, `tagName` forwarded) |\n\nTakumi's layout engine supports **Flexbox**, **CSS Grid**, `tw` Tailwind utility classes, and CSS\nanimations.\n\n\n## Installation\n\n```bash\ncomposer require avvertix/html-shot\n```\n\n**Requirements**\n\n- PHP 8.2 or higher\n- FFI extension enabled `ext-ffi` | enabled (`ffi.enable = true` in `php.ini`) |\n\n\n## Quick Example\n\n_tbd_\n\n\n\n## Development\n\n\n```bash\ngit clone https://github.com/avvertix/html-shot.git\ncd html-shot\n\n# Install PHP dependencies\ncomposer install\n\n# Build the Rust library\ncd rust \u0026\u0026 cargo build --release\n```\n\n\n### Build the native library\n\nThe Rust library must be compiled for your target platform. A pre-built binary is attached to each GitHub release or you can build your own.\n\n```bash\ncd vendor/avvertix/html-shot/rust\ncargo build --release\n```\n\nThen copy the compiled library to the `lib/` directory at the package root:\n\n| Platform | Source | Destination |\n|----------|--------|-------------|\n| Linux    | `target/release/libhtml_shot.so`    | `../lib/libhtml_shot.so`    |\n| macOS    | `target/release/libhtml_shot.dylib` | `../lib/libhtml_shot.dylib` |\n| Windows  | `target/release/html_shot.dll`      | `../lib/html_shot.dll`      |\n\nThe C header is auto-generated by cbindgen and written to `include/html_shot.h` during the build.\n\n\n## Troubleshooting\n\n### Enabling ext-ffi\n\nCheck whether FFI is active:\n\n```bash\nphp -m | grep FFI\n```\n\nIf it is not listed, add the following to your `php.ini` and restart PHP-FPM / your web server:\n\n```ini\nextension=ffi\nffi.enable=true\n```\n\n\n## Contributing\n\nContributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n## License\n\nMIT License - see [LICENSE](LICENSE.md) file for details.\n\n## Credits\n\nPowered by [Takumi](https://github.com/kane50613/takumi)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favvertix%2Fhtml-shot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favvertix%2Fhtml-shot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favvertix%2Fhtml-shot/lists"}