PHPackages                             avvertix/html-shot - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. avvertix/html-shot

ActiveLibrary[Image &amp; Media](/categories/media)

avvertix/html-shot
==================

HTML to image rendering for PHP, powered by Rust and Takumi

v0.1.0(1mo ago)043[1 PRs](https://github.com/avvertix/html-shot/pulls)MITPHPPHP ^8.3CI passing

Since Apr 21Pushed 3w agoCompare

[ Source](https://github.com/avvertix/html-shot)[ Packagist](https://packagist.org/packages/avvertix/html-shot)[ RSS](/packages/avvertix-html-shot/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (4)Versions (4)Used By (0)

html-shot
=========

[](#html-shot)

HTML to image rendering for PHP, powered by Rust and [Takumi](https://github.com/kane50613/takumi). Generate Open Graph images and more from HTML/CSS without headless browser overhead.

Features
--------

[](#features)

*tbd*

### HTML &amp; CSS Support

[](#html--css-support)

InputBehaviour`` tagsCSS extracted and applied as a stylesheetInline `style="..."`Promoted to a generated CSS class rule``Local paths and data URIs supportedCSS `background-image: url(...)`Local paths and data URIs supported``Rendered as a newline``, ``, ``Transparent wrappers, strippedAll other elementsRendered as Takumi container nodes (`class`, `id`, `tagName` forwarded)Takumi's layout engine supports **Flexbox**, **CSS Grid**, `tw` Tailwind utility classes, and CSS animations.

Installation
------------

[](#installation)

```
composer require avvertix/html-shot
```

**Requirements**

- PHP 8.2 or higher
- FFI extension enabled `ext-ffi` | enabled (`ffi.enable = true` in `php.ini`) |

Quick Example
-------------

[](#quick-example)

*tbd*

Development
-----------

[](#development)

```
git clone https://github.com/avvertix/html-shot.git
cd html-shot

# Install PHP dependencies
composer install

# Build the Rust library
cd rust && cargo build --release
```

### Build the native library

[](#build-the-native-library)

The 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.

```
cd vendor/avvertix/html-shot/rust
cargo build --release
```

Then copy the compiled library to the `lib/` directory at the package root:

PlatformSourceDestinationLinux`target/release/libhtml_shot.so``../lib/libhtml_shot.so`macOS`target/release/libhtml_shot.dylib``../lib/libhtml_shot.dylib`Windows`target/release/html_shot.dll``../lib/html_shot.dll`The C header is auto-generated by cbindgen and written to `include/html_shot.h` during the build.

Troubleshooting
---------------

[](#troubleshooting)

### Enabling ext-ffi

[](#enabling-ext-ffi)

Check whether FFI is active:

```
php -m | grep FFI
```

If it is not listed, add the following to your `php.ini` and restart PHP-FPM / your web server:

```
extension=ffi
ffi.enable=true
```

Contributing
------------

[](#contributing)

Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

License
-------

[](#license)

MIT License - see [LICENSE](LICENSE.md) file for details.

Credits
-------

[](#credits)

Powered by [Takumi](https://github.com/kane50613/takumi)

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance93

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

48d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d6c28ebb739784366f8f6751e40d630edef88d0ea094dcbc656351a1417c0a2?d=identicon)[avvertix](/maintainers/avvertix)

---

Top Contributors

[![avvertix](https://avatars.githubusercontent.com/u/5672748?v=4)](https://github.com/avvertix "avvertix (11 commits)")

---

Tags

html-to-imageopen-graphphp

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/avvertix-html-shot/health.svg)

```
[![Health](https://phpackages.com/badges/avvertix-html-shot/health.svg)](https://phpackages.com/packages/avvertix-html-shot)
```

###  Alternatives

[goat1000/svggraph

Generates SVG graphs

132890.0k3](/packages/goat1000-svggraph)[imagekit/imagekit

PHP library for Imagekit

46877.3k10](/packages/imagekit-imagekit)[jdenticon/jdenticon

Render PNG and SVG identicons.

62413.4k6](/packages/jdenticon-jdenticon)[gravatarphp/gravatar

Gravatar URL builder which is most commonly called as a Gravatar library

16644.1k2](/packages/gravatarphp-gravatar)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
