base64-image-fixture

1.1.1 • Public • Published

Base64 image fixtures npm

Collect base64 images for fixture usage

Usage

Visit here to download images or copy base64 string

Alternatively, install base64-image-fixture package.

$ yarn add dev base64-image-fixture

And, read as utf-8 string.

import fs from 'fs'

const base64PNGString =
  fs.readFileSync(
    './node_modules/base64-image-fixture/png/1x1-transparent',
    'utf8'
  )

console.log(base64PNGString)
// => data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=

License

MIT

Package Sidebar

Install

npm i base64-image-fixture

Weekly Downloads

1

Version

1.1.1

License

MIT

Last publish

Collaborators

  • annotis