skillfed

imgkit

Wkhtmltopdf python wrapper to convert html to image using the webkit rendering engine and qt

imgkit v1.2.3 598.5K downloads/30d#5,834 on PyPI824
Permissive license Abandoned released

What it is and what it does

imgkit is a Python wrapper around the wkhtmltoimage command-line utility, which uses the Webkit rendering engine to convert HTML into image files (PNG, JPG, etc.). It lets you generate images from live URLs, local HTML files, or HTML strings passed directly in code, with full control over output format, dimensions, cropping, headers, footers, and other rendering options via a dictionary-based configuration API.

The package is lightweight and depends only on six for Python 2/3 compatibility. However, it is abandoned—the last release was in February 2023 with no commits since May 2023. While the core functionality is stable and the tool itself (wkhtmltoimage) remains widely available, you should expect no bug fixes, security patches, or feature updates from the maintainer.

Use it for:

  • Generate thumbnail images from web pages or HTML templates for preview or archival purposes.
  • Convert HTML reports or invoices into image files for embedding in documents or emails.
  • Create automated screenshots of web content for testing or monitoring workflows.
  • Batch-convert HTML templates to images as part of a document generation pipeline.
  • Render dynamic HTML with custom CSS and options into static image output for distribution.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

imgkit wraps the wkhtmltoimage command-line tool to convert HTML (from URLs, files, or strings) into image files using the Webkit rendering engine.

Yes, if you need HTML-to-image conversion and accept the abandoned status. The package is simple, has low install friction, and depends only on six. However, do not use it in production without understanding that no upstream maintenance is available—if wkhtmltoimage itself breaks or you encounter bugs in imgkit, you will need to fork or find an alternative. For one-off scripts or internal tools where you control the environment, it is reasonable; for critical systems, evaluate maintained alternatives.

Install

imgkit on PyPI

pip

pip install imgkit

uv

uv add imgkit

poetry

poetry add imgkit

Installing imgkit

Before you install

Installation is straightforward (low friction), but the package is abandoned—last release was 2023-02-23 and no commits since 2023-05-29. The single runtime dependency is six, a stable compatibility library. Use only if you accept no upstream maintenance.

License in practice

Licensed under MIT (permissive), so you can use, modify, and distribute freely with minimal restrictions.

Quickstart

pip install imgkit
import imgkit
imgkit.from_url('http://example.com', 'output.jpg')
imgkit.from_file('input.html', 'output.jpg')
imgkit.from_string('<h1>Hello</h1>', 'output.jpg')

wkhtmltoimage binary must be installed separately on your system (via apt-get, brew, or manual download); imgkit is only the Python wrapper. On headless servers, xvfb may also be required.

Verify before relying

  • Current compatibility with modern Python versions beyond 3.9 (classifiers list 3.9 as the latest)
  • Whether the abandoned status affects real-world reliability or if the tool is stable enough for production use without updates

Package facts

License not declared (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — six
Maintenance abandoned — 1,268 days since the last release
Last repo commit
First released
Downloads 598,502/month — #5,834 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: imgkit-1.2.3-py3-none-any.whl

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Text ProcessingTopic :: Text Processing :: GeneralTopic :: Text Processing :: MarkupTopic :: Text Processing :: Markup :: HTMLTopic :: Text Processing :: Markup :: XMLTopic :: Utilities

Tags

html to image conversionwebkit html renderingwkhtmltoimage wrapperconvert html to png jpghtml screenshot generatorweb page to imagehtml rendering python
html-renderingimage-generationabandoned

More Utilities packages