Docs/Image Utils/GET /v1/image-resize

GET /v1/image-resizeImage Resize / Resample

Image Utils lf-image-utils

Makes a picture bigger or smaller. Takes an image URL plus optional width, height, fit (cover, contain, or fill), and format (jpeg, png, or webp). Returns width, height, format, and a resize note.

Query Parameters

ParameterTypeRequiredDescription
urlstringYesSource image URL
widthintegerNoTarget width
heightintegerNoTarget height
fitstringNocover, contain, or fill
formatstringNojpeg, png, or webp

Response Schema

width (integer): Output width
height (integer): Output height
format (string): Output format
note (string): Resize guidance

cURL Example

curl 'https://lf-image-utils.laminarforge.dev/v1/image-resize?url=<url>' -H 'Authorization: Bearer lf_YourApiKey'

Python Example

import requests
url = 'https://lf-image-utils.laminarforge.dev/v1/image-resize'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
params = {'url': '<url>'}
response = requests.get(url, headers=headers, params=params)
print(response.json())