Integrations

Use HTML to Image in the stack you already work with.

There are official SDKs for PHP, JavaScript, Python and Ruby, framework packages for Laravel and Django, plugins for WordPress, Statamic and Craft CMS, an Action for generating assets in CI, and an MCP server, listed on Smithery, that lets AI assistants render images themselves. Each one covers the same three jobs: turning your markup into an image, capturing a live URL, and converting HTML to PDF. Each page below is a complete implementation guide for that ecosystem, not a signpost back to the reference.

Every package, and where it is published

Every one is maintained alongside the API itself and published where its ecosystem expects to find it, so installing is one command in the tool you already use.

Integration Install Registry Licence Source
PHP composer require html2img/html2img-php Packagist MIT GitHub
Laravel composer require html2img/html2img-laravel Packagist MIT GitHub
JavaScript npm install @html2img/client npm MIT GitHub
Python pip install html2img-client PyPI MIT GitHub
Django pip install html2img-django PyPI MIT GitHub
Ruby bundle add html2img-client RubyGems MIT GitHub
WordPress wp plugin install html2img --activate WordPress.org GPL-2.0-or-later GitHub
Statamic composer require html2img/statamic-og-images Packagist MIT GitHub
Craft CMS composer require html2img/craft-og-images Craft Plugin Store MIT GitHub
GitHub Actions uses: html2img/action@v1 GitHub Marketplace MIT GitHub
Smithery Hosted, nothing to install View on Smithery Hosted service Not public

The same call in four languages

Every SDK wraps one REST API, so the shape of a render is the same wherever you call it from: a document in, a hosted URL out.

$client = new Html2img\Html2imgClient(getenv('HTML2IMG_API_KEY'));

$response = $client->html(new Html2img\Request\HtmlRequest(
    html: $document,
    width: 1200,
    height: 630,
));

echo $response->url;

Not in one of these languages? Any HTTP client works. POST JSON to https://app.html2img.com/api/html with an X-API-Key header, as described in the getting started guide.

What every integration shares

The packages differ in shape because the ecosystems do. What they render, and how they fail, does not.

One key, every endpoint

The same API key renders HTML, captures screenshots, fills named templates and produces PDFs. No separate products, no separate billing.

Real Chrome, everywhere

Every package posts to the same renderer, so flexbox, grid, custom properties, web fonts and inline JavaScript behave exactly as they do in your browser.

Nothing to host

No Chrome binary in your image, no Puppeteer version drift, no memory ceiling to tune. Your application makes one HTTP request.

Typed failures

Each SDK maps every API status onto its own exception or error class, so an out-of-credits response is something you can catch, not a string you have to parse.

Pick your stack and start rendering

50 free credits when you sign up. One credit renders one image or one PDF.