Resize Image
Image → Resize Image
The Resize Image API resizes an image by percentage or specific dimensions. You send the image as Base64 (docContent), docName, ImageResizeType (Percentage or Specific), and for Percentage: ResizePercentage; for Specific: Width, Height, and optionally MaintainAspectRatio; optionally async. The API returns the resized image. Use the tester below to try it; more details are in the sections that follow.
Try the Resize Image API
:::note Quick reference
Endpoint: POST /api/v2/ResizeImage · Required: api-key, docContent, docName, ImageResizeType
:::
:::info Try it live Use the form below to send your API key and image (Base64). Choose Percentage or Specific and set dimensions; the response is the resized image. No code required—fill the fields and click Send request. :::
Overview, parameters, and use cases
- Overview
- Parameters
- Use cases
What is Resize Image?
This endpoint resizes an image. You provide the image (Base64), docName, and ImageResizeType: Percentage (with ResizePercentage, e.g. 50.0) or Specific (with Width, Height in pixels, and optionally MaintainAspectRatio). The API returns the resized image.
Key features
- Percentage – Resize by percentage (e.g. 50% of original size).
- Specific – Resize to specific width and height in pixels; optionally maintain aspect ratio.
- Formats – Supported: JPG, PNG, GIF, BMP, TIFF.
:::tip Best for Use when you need thumbnails or smaller images for web or email. Combine with Compress Image or Create Image from PDF in a pipeline. :::
API parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api-key | string | Yes | Your PDF4me API key, Base64 encoded. Get it from the dashboard. |
| docContent | base64 | Yes | Image file content (Base64). Supported: JPG, PNG, GIF, BMP, TIFF. |
| docName | string | Yes | Output image file name. |
| ImageResizeType | string | Yes | Percentage or Specific. |
| ResizePercentage | string | No | Resize percentage (e.g. "50.0") for Percentage. |
| Width, Height | integer | No | Width and height in pixels for Specific. |
| MaintainAspectRatio | boolean | No | Maintain aspect ratio (for Specific). |
| async | boolean | No | Enable asynchronous processing. |
When to use Resize Image
- Thumbnails – Create smaller versions for previews or galleries.
- Web and email – Reduce dimensions for faster loading or attachments.
- Pipelines – Resize after Create Image from PDF or Crop Image before distribution.
:::info Need the full API? For request/response schemas and code samples, see Resize Image in the PDF4me API docs. :::
Prerequisites
Before using this endpoint, make sure you have:
- A valid PDF4me API key (Get your API Key)
- An image file (JPG, PNG, GIF, BMP, TIFF) in Base64 format
Response Format
The API returns a resized image file with the specified dimensions or percentage.