PHPackages                             tohidhabiby/htmltoimage - 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. tohidhabiby/htmltoimage

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

tohidhabiby/htmltoimage
=======================

generate image from html by wkhtmltoimage

1.0.0(6y ago)3178MITPHPPHP ^7.1.3

Since Jul 4Pushed 6y agoCompare

[ Source](https://github.com/tohidhabiby/htmltoimage)[ Packagist](https://packagist.org/packages/tohidhabiby/htmltoimage)[ Docs](https://github.com/tohidhabiby/htmltoimage)[ RSS](/packages/tohidhabiby-htmltoimage/feed)WikiDiscussions master Synced today

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

Generate image from url
=======================

[](#generate-image-from-url)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3659e27e4af723891b887b2bf0b4765ffca7f6d9dcc3c56740faafb4acb191a2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f6869646861626962792f68746d6c746f696d6167652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tohidhabiby/htmltoimage)[![Build Status](https://camo.githubusercontent.com/3a7adcd7eca1af1fb43f0119f11dcf56b170c6a64f9aedb00b8515d5ce7a25c5/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f746f6869646861626962792f68746d6c746f696d6167652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/tohidhabiby/htmltoimage)[![Quality Score](https://camo.githubusercontent.com/b9d3d7f2a727fd3d7b038116ba6a1af4817640794192928efb68438dea738a47/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f746f6869646861626962792f68746d6c746f696d6167652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/tohidhabiby/htmltoimage)[![Total Downloads](https://camo.githubusercontent.com/c868dd43b1bf5c640f0757ffc3fbfbe4be9db05c178126a4037fd07e42809b78/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f6869646861626962792f68746d6c746f696d6167652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tohidhabiby/htmltoimage)

This package uses wkhtmltoimage software, so you should install this software on your server.

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

[](#installation)

You can install the package via composer:

```
composer require tohidhabiby/htmltoimage
```

Usage
-----

[](#usage)

Use this code and set variables then you will have an image in your path.

```
use Tohidhabiby\HtmlToImage\HtmlToImage;

$htmlToImage = new HtmlToImage();
$htmlToImage->url($url)
    ->path($path)
    ->cropHeight($height) // optonal Set height for cropping
    ->cropWidth($width) // optonal Set width for cropping
    ->coordinateX($x) // optonal Set x coordinate for cropping
    ->coordinateY($y) // optonal Set y coordinate for cropping
    ->generate();
```

### Changelog

[](#changelog)

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

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [tohihabiby](https://github.com/tohidhabiby)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

PHP Package Boilerplate
-----------------------

[](#php-package-boilerplate)

This package was generated using the [PHP Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity54

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

Unknown

Total

1

Last Release

2502d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0521dbf90076ad7883116875e04a18ded54b3a7ac5343a01c6b4c8abc89a496e?d=identicon)[tohidhabiby](/maintainers/tohidhabiby)

---

Top Contributors

[![tohidhabiby](https://avatars.githubusercontent.com/u/33455742?v=4)](https://github.com/tohidhabiby "tohidhabiby (2 commits)")

---

Tags

htmltoimagetohidhabiby

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tohidhabiby-htmltoimage/health.svg)

```
[![Health](https://phpackages.com/badges/tohidhabiby-htmltoimage/health.svg)](https://phpackages.com/packages/tohidhabiby-htmltoimage)
```

###  Alternatives

[milon/barcode

Barcode generator like Qr Code, PDF417, C39, C39+, C39E, C39E+, C93, S25, S25+, I25, I25+, C128, C128A, C128B, C128C, 2-Digits UPC-Based Extention, 5-Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI (Variation of Plessey code)

1.5k13.3M39](/packages/milon-barcode)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[char0n/ffmpeg-php

PHP wrapper for FFmpeg application

495225.1k1](/packages/char0n-ffmpeg-php)[goat1000/svggraph

Generates SVG graphs

132849.6k3](/packages/goat1000-svggraph)[cohensive/embed

Media Embed (for Laravel or as a standalone).

120370.4k](/packages/cohensive-embed)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

63991.3k4](/packages/netresearch-rte-ckeditor-image)

PHPackages © 2026

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