---
title: Image Compressor
slug: compress-images
url: https://apyverse.com/apyhub/service/compress-images
provider: ApyHub
categories: [File Manipulation, Image Processing]
tags: [image-compression, image-optimization, file-compression, raster-images, asset-processing]
auth: api_key
---

# Image Compressor

Compress JPEG, PNG, WebP, GIF, TIFF, and BMP images from a URL or upload. Return binary output or a signed download link.

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| POST | `/processor/image/compress/url/file` | What it does Compresses a raster image fetched from a publicly accessible URL and returns the compr… | 30 |
| POST | `/processor/image/compress/file-urls` | What it does Compresses a raster image fetched from a public URL and returns a time-limited signed… | 30 |
| POST | `/processor/image/compress/file` | What it does Compresses an uploaded raster image and returns the compressed file as a binary downlo… | 30 |
| POST | `/processor/image/compress/file/url` | What it does Compresses a raster image uploaded as multipart form data and returns a signed URL for… | 30 |

## About

## What it does
Image Compressor reduces the size of raster images without changing your workflow. Send either a publicly accessible image URL or an uploaded image file, and choose a `compression_percentage` between 1 and 100. You can also set `preserve_format` to keep the original format, or provide an `output` name for the compressed file.

Use the URL-based endpoints when the image already lives online, or the multipart endpoints when you need to upload the file directly. The service supports JPEG, PNG, WebP, GIF, TIFF, and BMP inputs. Depending on the endpoint you choose, you either get the compressed file back as binary data or a time-limited pre-signed URL in a `data` field.

This is a good fit for reducing image payloads in content pipelines, preparing uploads for faster delivery, or shrinking assets before storing them in your own system. If you need a downloadable result, use the `/download` endpoints. If you want a temporary link you can pass around, use the `/link` endpoints.

## Usage

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyverse.com/apyhub/service/compress-images
