0.0.10 • Published 3 years ago

@compai/open-graph v0.0.10

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

@compai/open-graph

Take an image and resize it to standard sizes for social sharing and open graph images.

Installation

yarn add @compai/open-graph

Usage

import fs from 'fs'
import { resize } from '@compai/open-graph'

const IMG_URL = 'https://www.compai.pub/v1/png/93fd9a934120dc5ce1691b0d3e1918694b9d33c0b122b7f07ea7a65137fafc18'

(async () => {
  const imgs = await resize(IMG_URL)

  imgs.forEach(img => {
    fs.writeFileSync(`${img.height}x${img.width}.png`, img.img)
  })

  fs.writeFileSync('test.png', png)
})()

OSS by Components AI.

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.0

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

4 years ago