Bestseller
Image Processing Image Optimization File Compression

Image Compress

Compress and optimize images with customizable quality, dimensions, and format conversion. Supports both file upload and URL-based image processing with intelligent compression algorithms.

Data & API Features

Support both file upload and URL-based image processing;
Intelligent compression with customizable quality (1-95);
Flexible dimension control with target size and max size options;
Automatic aspect ratio preservation during resizing;
Format conversion support (JPEG, PNG, etc.);
Optimized compression algorithms for maximum file size reduction;
Support for large images up to 10MB;
Full API support for HTTPS (TLS v1.0 / v1.1 / v1.2 / v1.3);
Fully compatible with Apple ATS;
Nationwide multi-node CDN deployment;
Ultra-fast response, API interface load balancing built with multiple servers;
Perfect for web optimization, mobile apps, and content management systems.
Image Compress
Annual Subscription
$49$99
Try it for free!
Sign in to get a trial key and test all APIs.
Sign In
Secure payment by Stripe

API Document

HTTP Protocol:HTTPS

HTTP Method:POST

HTTP Endpoint:https://api.gugudata.io/v1/image/image-compress

Response Type:application/json; charset=utf-8

DEMO Endpoint:https://api.gugudata.io/v1/image/image-compress/demo

Live Demo:Try Interactive Demo

Full API Docs:developers.gugudata.io

API Request Parameters

NameTypeIs RequiredDefault ValueRemark
appkeystringtrueYOUR_APPKEYAPI key obtained after payment, can be passed as query parameter or in form data
filefilefalseN/AImage file to compress (JPEG, PNG, etc.). Either file or image_url must be provided, but not both
image_urlstringfalseN/AURL of the image to compress. Either file or image_url must be provided, but not both
targetWidthintegerfalseN/ATarget width in pixels. Image will be resized to this width while maintaining aspect ratio
targetHeightintegerfalseN/ATarget height in pixels. Image will be resized to this height while maintaining aspect ratio
maxWidthintegerfalseN/AMaximum width in pixels. Image will be resized if it exceeds this width, maintaining aspect ratio
maxHeightintegerfalseN/AMaximum height in pixels. Image will be resized if it exceeds this height, maintaining aspect ratio
qualityintegerfalse85Compression quality (1-95). Higher values mean better quality but larger file size. Default is 85
formatstringfalseN/AOutput format (JPEG, PNG, etc.). If not specified, original format is preserved

API Response Parameters

NameTypeRemark
imagebinaryCompressed image file stream (JPEG, PNG, etc.) with appropriate Content-Type header

API Response Status Codes

Status CodeExplanation of Status CodeRemarks
200API responding normally For business status codes, see below under API Custom Status Codes.
400Parameter error
402APPKEY error Please check if the APPKEY provided is the one obtained from the developer center.
403Account overdue Please pay attention to the E-mail reminders regarding order expiration.
429Request rate limited Requests cannot exceed 5 times per second. The CDN layer intelligently determines based on the frequency of IP requests. General high-frequency requests do not trigger this status code.
500API response error

Code Snippets Run In Postman

Others also bought