Image Process Microservice libvips Optimized

A high-performance PHP-based microservice for real-time image processing operations using libvips.

API Endpoint

GET POST /image-process.php

Parameters

Parameter Type Description Default
content string Base64-encoded image data (POST only) -
url string URL of image to process (GET only) -
quality int Output quality (1-100) 50
type string Output format: jpg, png, webp, avif avif
width int Target width in pixels -
height int Target height in pixels -
rotate int Rotation angle in degrees -
crop_width int Crop width in pixels -
crop_height int Crop height in pixels -
crop_position string Crop position: center, top, bottom, left, right center

Example Usage

# Resize image from URL
curl "https://dev36.eweb.lv/image-process.php?url=https://example.com/image.jpg&width=800&height=600&type=webp&quality=80"

# Crop image to square from center
curl "https://dev36.eweb.lv/image-process.php?url=https://example.com/image.jpg&crop_width=500&crop_height=500&crop_position=center"

# Rotate and convert format
curl "https://dev36.eweb.lv/image-process.php?url=https://example.com/image.jpg&rotate=90&type=png"