Service Layer medium complexity mobile
0
Dependencies
1
Dependents
0
Entities
0
Integrations

Description

Applies client-side JPEG and PNG compression using the flutter_image_compress package before upload, targeting output files under 500 KB to minimise bandwidth consumption — especially important for users on limited mobile data plans. PDF files are passed through without modification.

Feature: Receipt Photo Upload

image-compression-service

Responsibilities

  • Compress JPEG and PNG images to a configurable target size
  • Preserve image orientation and essential EXIF metadata
  • Pass PDF files through without modification
  • Report original versus compressed file sizes for diagnostics
  • Validate that compressed output remains legible for receipt review

Interfaces

compressImage(file, targetSizeKb)
compressBatch(files)
getCompressionStats(originalFile, compressedFile)
validateReadability(compressedFile)
getSupportedFormats()
setQualityThreshold(minQuality)

Relationships

Dependents (1)

Components that depend on this component