npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@fawadhs/image-tools

v2.6.2

Published

Privacy-first image conversion and editing React component. Convert HEIC, JPEG, PNG to WebP with crop, rotate, filters, and text overlay tools.

Downloads

281

Readme

@fawadhs/image-tools

Privacy-first image conversion and editing React component. Convert HEIC, JPEG, PNG to WebP with crop, rotate, filters, and text overlay tools.

NPM Version License: MIT TypeScript

✨ Features

  • 🔒 100% Client-Side - No uploads, no tracking. Your images never leave the browser
  • 📸 Multiple Formats - HEIC, JPEG, PNG, GIF, BMP, TIFF → WebP, JPEG, PNG, AVIF
  • 🎨 Full Editing Suite - Crop (rectangle/circle), rotate, flip, filters, text overlays
  • ⚡ Web Workers - Background processing for optimal performance
  • 📦 Batch Processing - Process up to 50 images simultaneously
  • 🌙 Dark Mode - Beautiful dark-first design with theme support
  • 📱 Mobile Ready - Full touch support for mobile and tablets
  • ♿ Accessible - WCAG 2.1 Level AA compliant
  • 🎯 TypeScript - Full type definitions included

📦 Installation

npm install @fawadhs/image-tools
# or
yarn add @fawadhs/image-tools
# or
pnpm add @fawadhs/image-tools

🚀 Quick Start

import { ImageTools } from '@fawadhs/image-tools';
import '@fawadhs/image-tools/styles';

function App() {
  return (
    <div>
      <h1>Image Converter</h1>
      <ImageTools />
    </div>
  );
}

📖 Usage Examples

With Callbacks

import { ImageTools } from '@fawadhs/image-tools';
import '@fawadhs/image-tools/styles';

function AdminPanel() {
  const handleComplete = (files) => {
    console.log('Conversion complete!');
    files.forEach(file => {
      console.log(`${file.originalName} → ${file.name}`);
      // Upload to server, update database, etc.
      uploadToServer(file.blob, file.name);
    });
  };

  return (
    <ImageTools 
      theme="dark"
      maxFiles={50}
      defaultFormat="webp"
      defaultQuality={85}
      onConversionComplete={handleComplete}
    />
  );
}

Next.js App Router

'use client';

import { ImageTools } from '@fawadhs/image-tools';
import '@fawadhs/image-tools/styles';

export default function ImageEditorPage() {
  return <ImageTools theme="system" />;
}

Next.js Pages Router (with SSR)

import dynamic from 'next/dynamic';
import '@fawadhs/image-tools/styles';

const ImageTools = dynamic(
  () => import('@fawadhs/image-tools').then(mod => mod.ImageTools),
  { ssr: false }
);

export default function Page() {
  return <ImageTools />;
}

🎛️ Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | theme | 'light' \| 'dark' \| 'system' | 'system' | Theme mode | | maxFiles | number | 50 | Maximum files allowed | | defaultFormat | 'webp' \| 'jpeg' \| 'png' \| 'avif' | 'webp' | Default output format | | defaultQuality | number | 85 | Default quality (1-100) | | onConversionComplete | (files) => void | - | Callback when conversion completes | | onFilesSelected | (count) => void | - | Callback when files are selected | | className | string | - | Custom CSS class | | features | object | - | Enable/disable specific features |

🎨 Styling

The component includes all necessary styles. Simply import the CSS file:

import '@fawadhs/image-tools/styles';

For custom styling, wrap the component and override CSS classes:

<div className="custom-wrapper">
  <ImageTools className="custom-tools" />
</div>

📝 TypeScript

Full TypeScript support with type definitions:

import type { 
  ImageToolsProps,
  SelectedFile,
  OutputFormat,
  ConvertOptions,
  ImageTransform 
} from '@fawadhs/image-tools';

🌐 Browser Support

  • Chrome/Edge 90+
  • Firefox 88+
  • Safari 14+
  • Mobile browsers with ES2020 support

📄 License

MIT © Fawad Hussain

🔗 Links

🤝 Contributing

Contributions welcome! See CONTRIBUTING.md.


Made with ❤️ for developers, designers, and creators worldwide