1 Repo
Scales images to fit within maximum or minimum width and height constraints while preserving aspect ratio.
Distinct from Dimension Resizing: Distinct from Dimension Resizing: adds explicit min/max bounds and aspect ratio preservation, not just pixel dimension adjustment.
Explore 1 awesome GitHub repository matching graphics & multimedia · Bounded. Refine with filters or upvote what's useful.
Compressorjs is a client-side image compression library that reduces file sizes in the browser before upload, using the HTML Canvas API to re-encode images into smaller File or Blob objects. It supports JPEG, PNG, and WebP formats, with configurable quality and dimension controls to balance file size and visual fidelity. The library distinguishes itself through several integrated capabilities. It reads Exif orientation metadata from JPEG images and automatically rotates or flips the canvas to ensure correct display after compression. An AbortController integration allows cancellation of an in
Scales images within configurable min/max bounds while preserving aspect ratio.