# Resize image to 100kb

**Use case:** 

Resize and compress images toward a 100 KB target, then check file-size status in each output row.

## Input

```json
{
  "images": [
    {
      "url": "https://placehold.co/1600x1000.jpg?text=100kb",
      "id": "target-100kb"
    }
  ],
  "combineImages": false,
  "targetPreset": "custom",
  "width": 800,
  "height": 600,
  "fit": "contain",
  "position": "center",
  "paddingMode": "solid",
  "backgroundColor": "#FFFFFF",
  "outputFormat": "jpeg",
  "quality": 55,
  "maxFileSizeMb": 0.1,
  "preserveMetadata": false
}
```

## Output

```json
{
  "id": {
    "label": "ID",
    "format": "string"
  },
  "source.type": {
    "label": "Type",
    "format": "string"
  },
  "source.url": {
    "label": "URL",
    "format": "string"
  },
  "output.url": {
    "label": "URL",
    "format": "string"
  },
  "output.width": {
    "label": "Width",
    "format": "integer"
  },
  "output.height": {
    "label": "Height",
    "format": "integer"
  },
  "output.format": {
    "label": "Format",
    "format": "string"
  },
  "output.sizeBytes": {
    "label": "Size bytes",
    "format": "integer"
  },
  "compressionRatio": {
    "label": "Compression ratio",
    "format": "number"
  },
  "fileSizeWithinLimit": {
    "label": "File size within limit",
    "format": "boolean"
  }
}
```

## About this Actor

This example demonstrates how to use [Image Resizer API](https://apify.com/maximedupre/image-resizer-api) with a specific input configuration. Visit the [Actor detail page](https://apify.com/maximedupre/image-resizer-api) to learn more, explore other use cases, and run it yourself.