# template2image

> Basic Html Template To Image

Latest version **1.0.4** (published 2022-09-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install template2image
pnpm add template2image
yarn add template2image
bun add template2image
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2022-09-25 |
| First published | 2022-09-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | 371Digital |
| Maintainers | 371digital |
| Keywords | html-to-image, 371Digital, template, image, html, js, nodejs |

## Links

- npm: https://www.npmjs.com/package/template2image
- Repository: https://github.com/371digital/template2image
- Issues: https://github.com/371digital/template2imaget/issues
- npm.io page: https://npm.io/package/template2image

## Dependencies (2)

- [puppeteer](https://npm.io/package/puppeteer.md) 17.1.3
- [chrome-aws-lambda](https://npm.io/package/chrome-aws-lambda.md) 10.1.0

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.4 (latest) — 2022-09-25
- 1.0.3 — 2022-09-18
- 1.0.2 — 2022-09-17
- 1.0.1 — 2022-09-17
- 1.0.0 — 2022-09-11

## README

# template2Image

## Description
Html template'i resim'e dönüştürmek için kullanılır

## Example
```javascript
import template2Image from "template2image";

const createCardImage = async () => {
    const image = await template2Image(`
    <html>
        <head>
            <style>
                #card {
                    color: white;
                    border-radius: 8px;
                    background-color: black;
                    height: 80px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                }
            </style
        </head>
        <body>
            <div id="card">
                {{title}}
            <div>
        </body>
    </html>
`, { title: "Hello template2Image :D" }, "card");
    console.log(image);
    // Image return for base64
}

createCardImage();
```

![template2image](https://images.371digital.com/tempalte2image.png)

---
_Source: https://npm.io/package/template2image · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
