Skip to main content
Glama

compress_image

Reduce image file size by compressing and optionally resizing images to specified dimensions. Supports JPEG, WebP, and PNG formats for optimized storage and faster loading.

Instructions

Compress an image to reduce file size.

Optionally resize to max dimensions while compressing. Works best with JPEG and WebP. PNG files will be converted to optimized PNG.

Args: path: Absolute path to the image file. quality: Compression quality (1-100, lower = smaller file). Default 60. max_width: Optional maximum width. Image will be downscaled if wider. max_height: Optional maximum height. Image will be downscaled if taller. output_path: Where to save. Defaults to _compressed..

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
qualityNo
max_widthNo
max_heightNo
output_pathNo

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Adityaaery20/media-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server