LighterImage - Image Compressor With No Quality Loss avatar
LighterImage - Image Compressor With No Quality Loss

Pricing

Pay per event

Go to Apify Store
LighterImage - Image Compressor With No Quality Loss

LighterImage - Image Compressor With No Quality Loss

Compress images & convert to WebP in one API call. Input via URL, Base64, or KV store. Output: optimized original + WebP with compression stats. TinyPNG-quality algorithms (mozjpeg, palette mode, smart subsampling). Batch processing for automation pipelines. Pay only for successful compressions.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Jake Reinders

Jake Reinders

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

7 days ago

Last modified

Share

Image Processing & WebP Conversion Actor

Convert images to WebP, resize for your use case, and normalize output from any source. Powered by LighterImage.

What This Actor Does

  1. WebP conversion - Modern format supported by 97%+ browsers, 20-40% smaller than JPEG
  2. Batch resizing - Generate thumbnails or normalize dimensions across sources
  3. Compression - mozjpeg/oxipng for sources that aren't pre-optimized
  4. Format normalization - Consistent output when aggregating from multiple sources
  5. Self-hosting prep - Process images before uploading to your own CDN/S3

When This Helps Most

Not all images benefit equally. Here's what to expect:

Source TypeCompression SavingsWebP SavingsBest Use
Real estate (MLS)40-60%Additional 20%Full pipeline
Small e-commerce30-50%Additional 20%Full pipeline
Classifieds/forums30-50%Additional 20%Full pipeline
Major platforms (Instagram, Amazon)5-15%15-25%WebP conversion, resizing
Any source--Thumbnail generation

Key insight: Major platforms already optimize images. You'll still benefit from WebP conversion and resizing, but don't expect 50% compression savings from already-optimized sources.

Web Interface vs. API

  • Manual processing: Use LighterImage for drag-and-drop (up to 30 files, free)
  • Automation: Use this Actor to integrate into scraping and processing pipelines

Features

  • Multiple input methods: URL, Base64 data, or Apify Key-Value store
  • Dual output: Compressed original format + WebP version
  • Batch processing: Up to 200 images/run on Pro tier
  • Smart resizing: maxWidth / maxHeight with aspect ratio preservation
  • Configurable quality: Default optimized settings or custom quality (1-100)

Performance

Batch SizeDurationThroughput
5 images0.5s10 img/s
20 images1.2s17 img/s
50 images4.8s10 img/s

Run benchmarks: npm run test:bench

Case Study: Real Estate Pipeline

Tested on 15 property listing photos (unoptimized camera uploads):

MetricResult
Original3.38 MB
After WebP1.77 MB
Savings47%

By room type:

  • Kitchen: 60% savings
  • Dining room: 66% savings
  • Bathroom: 57% savings
  • Exterior: 46% savings

Real estate is an ideal use case because MLS photos are uploaded directly from cameras without optimization.

Run the case study: npm run case-study

Input Configuration

{
"images": [
{ "url": "https://example.com/image.jpg" },
{ "base64": "iVBORw0KGgo..." },
{ "key": "my-image-key", "filename": "photo.png" }
],
"quality": 80,
"returnWebp": true,
"returnOriginalFormat": true,
"maxWidth": 1200,
"maxHeight": 800
}

Parameters

ParameterTypeDefaultDescription
imagesarrayrequiredArray of images to process
images[].urlstring-Public URL of image
images[].base64string-Base64-encoded image data
images[].keystring-Key in Apify KV store
images[].filenamestring-Output filename
qualitynumber80Compression quality (1-100)
returnWebpbooleantrueGenerate WebP version
returnOriginalFormatbooleantrueReturn compressed original
maxWidthnumber-Max width for resizing
maxHeightnumber-Max height for resizing

At least one of url, base64, or key required per image.

Output

{
"results": [
{
"input": "https://example.com/image.jpg",
"originalCompressedUrl": "https://api.apify.com/v2/key-value-stores/.../records/...",
"webpUrl": "https://api.apify.com/v2/key-value-stores/.../records/...",
"stats": {
"inputSize": 225000,
"compressedSize": 142000,
"webpSize": 118000,
"compressionRatio": 0.63,
"durationMs": 128
}
}
],
"successCount": 1,
"errorCount": 0,
"totalDurationMs": 250
}

Use Cases

1. Real Estate / MLS Photos

Chain with Redfin, Zillow, or Realtor.com scrapers. Camera uploads = big savings.

{
"images": [{ "url": "https://mls-photos.example.com/listing.jpg" }],
"returnWebp": true,
"maxWidth": 1200
}

2. Thumbnail Generation

Works regardless of source optimization level.

{
"images": [{ "url": "https://any-source.com/photo.jpg" }],
"maxWidth": 400,
"maxHeight": 300,
"returnWebp": true,
"returnOriginalFormat": false
}

3. WebP Conversion Only

For already-optimized sources where you just need format conversion.

{
"images": [{ "url": "https://cdn.example.com/optimized.jpg" }],
"returnWebp": true,
"returnOriginalFormat": false
}

4. Normalize Mixed Sources

Consistent output when aggregating from multiple sources.

{
"images": [
{ "url": "https://source-a.com/photo.jpg" },
{ "url": "https://source-b.com/image.png" },
{ "url": "https://source-c.com/pic.webp" }
],
"quality": 80,
"maxWidth": 1000,
"returnWebp": true
}

Compression Engine

  • JPEG: mozjpeg encoder with trellis quantization and progressive scanning
  • PNG: Palette mode with Floyd-Steinberg dithering
  • WebP: Smart subsampling with effort level 6

Tier Limits

TierImages/RunMax File Size
Free1015 MB
Pro20030 MB

License

ISC