PHPackages                             choowx/satori-php - 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. choowx/satori-php

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

choowx/satori-php
=================

Run Satori — enlightened library to convert HTML and CSS to SVG, using PHP

v0.2.3(1y ago)185592[1 PRs](https://github.com/choowx/satori-php/pulls)MITPHPPHP ^8.1CI passing

Since Jan 2Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/choowx/satori-php)[ Packagist](https://packagist.org/packages/choowx/satori-php)[ Docs](https://github.com/choowx/satori-php)[ GitHub Sponsors](https://github.com/choowx)[ RSS](/packages/choowx-satori-php/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (5)Dependencies (4)Versions (7)Used By (0)

[![Satori](https://raw.githubusercontent.com/vercel/satori/main/.github/card.png)](https://raw.githubusercontent.com/vercel/satori/main/.github/card.png)

Run Satori — enlightened library to convert HTML and CSS to SVG, using PHP
==========================================================================

[](#run-satori--enlightened-library-to-convert-html-and-css-to-svg-using-php)

[![Latest Version on Packagist](https://camo.githubusercontent.com/88f930ad339f7d765aa730e845bac2334ac9a7952f0ea6d708769548521b6a69/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63686f6f77782f7361746f72692d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/choowx/satori-php)[![Tests](https://camo.githubusercontent.com/36cdb81545a4c6a72a860479a15d7c130ec3b6e3ad90f30e2c92f27af4996e71/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f63686f6f77782f7361746f72692d7068702f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/choowx/satori-php/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/2f403faca3454e3afd5c7447d128f971b4c364cf7ac5c4fedd5fed7835b54f85/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63686f6f77782f7361746f72692d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/choowx/satori-php)

[Satori](https://github.com/vercel/satori) — enlightened library to convert HTML and CSS to SVG.

This package makes it easy to run Satori using PHP.

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

[](#installation)

You can install the package via composer:

```
composer require choowx/satori-php
```

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

```
npm install satori
npm install html-react-parser
```

Usage
-----

[](#usage)

```
use Choowx\Satori\Satori;

$svg = Satori::html('hello, world')->convert();
// $svg = 'width(600)
    ->height(315)
    ->convert();
// $svg = ' Satori currently supports three font formats: TTF, OTF and WOFF. Note that WOFF2 is not supported at the moment.

```
use Choowx\Satori\Font;
use Choowx\Satori\Satori;

$svg = Satori::html('hello, world')
    ->withFonts([
        Font::path('/path/to/Roboto-Regular.ttf')
            ->name('Roboto')
            ->weight(400)
            ->style('regular'),
        Font::path('/path/to/Roboto-Bold.ttf')
            ->name('Roboto')
            ->weight(700)
            ->style('bold'),
    ])
    ->convert();
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](https://github.com/choowx/satori-php/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Choo Wen Xuan](https://github.com/choowx)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance63

Regular maintenance activity

Popularity25

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 51.6% 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 ~141 days

Total

5

Last Release

701d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d2f54f136f29eece042c8d77bd6d4a8698739e845f9106c7c0a4da6eb268d5bd?d=identicon)[choowx](/maintainers/choowx)

---

Top Contributors

[![choowx](https://avatars.githubusercontent.com/u/63900628?v=4)](https://github.com/choowx "choowx (33 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (18 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (13 commits)")

---

Tags

convertcsshtmlimagephpsatorisatori-phpsvgconvertcssimagehtmlsvgchoowxSatorisatori-php

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/choowx-satori-php/health.svg)

```
[![Health](https://phpackages.com/badges/choowx-satori-php/health.svg)](https://phpackages.com/packages/choowx-satori-php)
```

###  Alternatives

[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k35.1M142](/packages/spatie-browsershot)[spatie/image

Manipulate images with an expressive API

1.4k58.5M175](/packages/spatie-image)[lasserafn/php-initial-avatar-generator

A package to generate avatars with initials for PHP

4404.3M15](/packages/lasserafn-php-initial-avatar-generator)[choowx/rasterize-svg

A PHP library for converting SVG to JPEG, PNG, and WEBP

2275.4k](/packages/choowx-rasterize-svg)[finller/laravel-media

A flexible media library for Laravel

472.1k](/packages/finller-laravel-media)[elegantly/laravel-media

A flexible media library for Laravel

475.6k4](/packages/elegantly-laravel-media)

PHPackages © 2026

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