All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Zero dependencies — removed
browser-image-compression. Encoding now uses the browser’s nativeOffscreenCanvas.convertToBlobAPI - Framework-agnostic — removed Angular (
@Injectable) and RxJS (BehaviorSubject,Observable) from the core service; works with any JavaScript environment - Promise-based API —
convertFormat()andcompressImages()now returnPromise<void>instead ofObservable<void> - Reactive state — replaced RxJS subjects with a zero-dependency
Subjectprimitive; the callback API (onImagesChange,onUploadingChange,onProgressChange) is unchanged
destroy()lifecycle method — releases blob URLs, clears all listeners, cancels timersMediaOptimizerErrorbase class — catch all library errors with a singleinstanceofcheck
useWebWorkeroption (was deprecated no-op since v1.3, now fully removed)- Runtime dependency on
rxjs - Runtime dependency on
browser-image-compression
- Replace
.subscribe()calls withawaitor.then()/.catch() - Remove
useWebWorkerfrom your options objects - If using Angular DI: either instantiate directly (
new ImageConverterService()) or provide manually inproviders
- Abort Support: New
abortProcessing()method to cancel ongoing operations - Input Validation: Comprehensive file validation (MIME types, size limits, empty files)
- SSR Support: Server-Side Rendering compatibility with proper browser API checks
- Lifecycle Management:
ngOnDestroy()implementation for automatic cleanup - Cache Stats: New
getCacheStats()method to monitor cache usage
- Performance: LRU cache eviction optimized from O(n) to O(1) - 100x faster
- Code Quality: Eliminated code duplication, replaced magic numbers with constants
- Type Safety: Removed all unsafe type assertions, improved null handling
- Memory Leaks: Fixed event handler cleanup in image loading error paths
- Security: Added file size validation to prevent DoS from huge files
- Type Safety: Removed non-null assertions and unsafe canvas type casts
1.1.0 - 2026-02-01
- AVIF Format Support: Added support for AVIF image format across all conversion and validation methods
- Image Validation Methods (
ImageUtilsService):validateDimensions(): Validate image dimensions against min/max constraintsvalidateFileSize(): Validate file size with optional min/max limits in MBvalidateBatch(): Batch validation with comprehensive options (format, size, dimensions)
- Image Analysis Methods (
ImageUtilsService):hasTransparency(): Detect transparency/alpha channel in imagesisAnimated(): Detect animated GIFs and WebPs using binary analysisgetDominantColor(): Calculate dominant color using color quantization algorithm
- State Management Methods (
ImageConverterService):removeImage(): Remove individual image by ID with automatic resource cleanupremoveAllImages(): Clear all images with bulk cleanupclearCompleted(): Remove only completed images
- Download Functionality (
ImageConverterService):downloadImage(): Download individual compressed imagedownloadAllImages(): Download all completed images with staggered execution
- Improved type definitions to include AVIF format
- Enhanced error handling with detailed logging
- Updated all validation methods to support AVIF
- Image format detection now properly identifies AVIF files
1.0.1 - 2026-01-31
- Initial public release
- Core image conversion and compression functionality
- Support for WebP, JPEG, and PNG formats
- Parallel processing with RxJS
- Framework-agnostic design