Skip to content

About

A web-based tool that allows users to upload an image and simulate estimated file sizes for different image formats (JPG, PNG, WebP, and AVIF) with adjustable quality settings. Estimate image size differences between formats.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Format Size Estimator

A web-based tool that allows users to upload an image and simulate estimated file sizes for different image formats (JPG, PNG, WebP, and AVIF) with adjustable quality settings.

Image Format Size Estimator

Image Format Size Estimator

Image Format Size Estimator

Features

  • Image Upload: Drag-and-drop or click to upload images
  • Format Support: Compare sizes for JPEG, PNG, WebP, and AVIF formats
  • Quality Sliders: Adjust quality settings for each format independently
  • Real-time Estimation: Instant size calculations as you adjust quality
  • Visual Comparison: Bar chart showing relative sizes across formats
  • Best Format Recommendation: Automatically identifies the smallest format option

How to Use

  1. Open index.html in a modern web browser
  2. Upload an image by:
    • Clicking the upload box and selecting a file
    • Dragging and dropping an image onto the upload box
  3. Adjust the quality sliders for each format to see how it affects file size
  4. Compare the estimated sizes in the comparison chart
  5. Use the recommended format for optimal file size

Supported Image Formats

Input Formats:

  • JPEG/JPG
  • PNG
  • WebP
  • GIF
  • BMP

Output Estimations:

  • JPEG (quality: 1-100)
  • PNG (compression: 1-100)
  • WebP (quality: 1-100)
  • AVIF (quality: 1-100)

How It Works

The tool uses algorithmic estimation based on typical compression characteristics:

  • JPEG: Lossy compression with configurable quality (higher quality = larger size)
  • PNG: Lossless compression with adjustable compression level
  • WebP: Modern format with better compression than JPEG at similar quality
  • AVIF: Next-generation format with the most efficient compression

Note: Estimates are based on typical compression ratios and may vary from actual conversion results. For precise measurements, actual format conversion is required.

Technical Details

  • Pure HTML, CSS, and JavaScript (no dependencies)
  • Client-side processing (no server required)
  • Responsive design for desktop and mobile devices
  • No image data is uploaded to any server

Browser Compatibility

Works in all modern browsers that support:

  • HTML5 File API
  • Canvas API
  • ES6+ JavaScript

Tested on:

  • Chrome 90+
  • Firefox 88+
  • Safari 14+
  • Edge 90+

License

See LICENSE file for details.

About

A web-based tool that allows users to upload an image and simulate estimated file sizes for different image formats (JPG, PNG, WebP, and AVIF) with adjustable quality settings. Estimate image size differences between formats.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages