SDK Recipes›Enhance → Resize → WebP
Image Workflow

Enhance → Resize → WebP

Improve an image, resize it for web delivery, then convert the final result to WebP.

image-enhancer
→
resize-image
→
jpg-to-webp
InputJPG / PNG / WebP
Final resultWebP File
Tools usedimage-enhancer → resize-image → jpg-to-webp

Complete code

const enhanced = await client.run("image-enhancer", {
  file: originalFile,
  options: {
    preset: "balanced",
    auto: true,
    format: "jpg",
    quality: 0.92
  }
});

const resized = await client.run("resize-image", {
  file: enhanced.files[0],
  options: {
    width: 1200,
    keepAspectRatio: true,
    format: "jpg",
    quality: 0.9
  }
});

const webp = await client.run("jpg-to-webp", {
  file: resized.files[0],
  options: {
    quality: 0.85
  }
});

const finalFile = webp.files[0];
Before adapting this recipe, use client.describe(toolId) or the Tool Reference page to verify exact file limits, option values, and supported modes.