0.0.10 • Published 4 years ago

@compai/open-graph v0.0.10

Weekly downloads
-
License
-
Repository
-
Last release
4 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

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.0

4 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago