JSPM

lite-image-resizer

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q42521F
  • License MIT

A utility for resizing images.

Package Exports

  • lite-image-resizer
  • lite-image-resizer/dist/cjs/index.js
  • lite-image-resizer/dist/esm/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (lite-image-resizer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Lite Image Resizer


🥤 A utility for resizing images.

Table of Contents

  1. Installation
  2. Usage
  3. Invoke

💽Installation

 npm install lite-image-resizer

📄Usage

Import in your ts or js file

import { imageResizer } from 'lite-image-resizer'

🛠Invoke

const resizedImage = await imageResizer(file, 400, 'rabbit')

📦 Props

The imageResizer function takes in 3 arguments.

Params Description Type Default
file Raw file from HTML input File none
resizeWith The width you want to resize the image to. The imageResizer function will maintain aspect ratio. Number none
newFileName The function receives the newFileName and prefixes it with the current timestamp. String none

Issues

If you experience any anomaly or bug while using the component, feel free to create an issue on this repo issues

👷🏽 Contribution Guide

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star. Thanks!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request