html-load-image
TypeScript icon, indicating that this package has built-in type declarations

1.4.0 • Public • Published

HTML Load Image Package

Overview

This package is to get the image files as dataURLs from Event or DragEvent. It's using blueimp-load-image package as a dependency.

Install

yarn add html-load-image

Definitions

type getImage = (event: Event, options?: LoadImageOptions) => Promise<string>

type getImages = (event: Event, options?: LoadImagesOptions) => Promise<string[]>

type LoadImageOptions = Omit<BlueImpLoadImageOptions, 'orientation' | 'meta' | 'canvas'>

interface LoadImagesOptions extends LoadImageOptions {
  maxLoadImageCount: number
}

Usage

const image = await getImage(event)
const images = await getImages(event, { maxLoadImageCount: 5 })

Readme

Keywords

none

Package Sidebar

Install

npm i html-load-image

Weekly Downloads

2

Version

1.4.0

License

MIT

Unpacked Size

10.9 kB

Total Files

13

Last publish

Collaborators

  • sura0111