---
canonical: 'https://htmlcsstoimage.com/features/url-to-webp'
title: 'Screenshot Webpages as WebP'
description: 'Instructions for capturing webpages as WebP, including URL screenshot options, the format parameter, MCP usage, and related output formats.'
---

# Screenshot Webpages as WebP

Send a public URL to the image API with `format` set to `webp`. The API loads the page in managed Chromium and returns a hosted .webp screenshot URL.

## When to use WebP

WebP combines modern compression with strong visual quality, making it a good fit for webpage screenshots delivered on the web.

- **Efficient compression**: Deliver high-quality webpage captures with smaller files than many traditional image formats.
- **Transparency support**: Keep transparent page areas while benefiting from a web-focused output format.
- **Built for web delivery**: Use WebP for product previews, content feeds, monitoring dashboards, and performance-sensitive applications.

## API request

Send an authenticated `POST` request to `https://hcti.io/v1/image`. Include `url`, `format`, and any viewport, selector, timing, or browser options required for the capture.

```json
{
  "url": "https://example.com",
  "format": "webp",
  "viewport_width": 1200,
  "viewport_height": 630
}
```

## Request workflow

1. **Send the webpage URL** — Submit a public URL with format set to webp and any viewport, selector, or browser settings.
2. **Chromium loads the page** — The API runs the webpage, styles, fonts, images, and JavaScript in a managed browser environment.
3. **Use the .webp URL** — Embed the hosted result, download the file, or save it in your own storage and application records.

## Capture controls and output handling

- Authenticate from trusted server-side code. Do not expose an API key in browser JavaScript, logs, or agent-visible output.
- Use `full_screen`, `selector`, viewport dimensions, timing, and browser options to capture the required page state.
- Treat the returned URL as the generated `webp` resource. Download it, embed it, or copy it to configured storage as required.

## Use through MCP

An MCP-compatible agent can connect to `https://mcp.hcti.io` with OAuth and use the connected HTML/CSS to Image account instead of handling an API key directly.

Ask the MCP tool to capture the supplied URL as WebP, or specify `format: webp` explicitly in the request.

- [Read the MCP integration documentation](https://docs.htmlcsstoimage.com/integrations/mcp/)

## Related conversions

- [HTML to WebP](https://htmlcsstoimage.com/features/html-to-webp.md): Render supplied HTML and CSS as WebP instead of capturing a public webpage.
- [URL to PNG](https://htmlcsstoimage.com/features/url-to-png.md): PNG preserves sharp text, interface details, and transparency, making it a reliable format for webpage archives and UI captures.
- [URL to JPEG](https://htmlcsstoimage.com/features/url-to-jpeg.md): JPEG is a practical choice for photographic and content-heavy webpages where broad compatibility and smaller files matter.
- [URL to PDF](https://htmlcsstoimage.com/features/url-to-pdf.md): Generate paginated documents from public webpages with page sizing, margins, backgrounds, and print styles.

## Reference links

- [URL screenshot API documentation](https://docs.htmlcsstoimage.com/getting-started/url-to-image/)
- [MCP integration documentation](https://docs.htmlcsstoimage.com/integrations/mcp/)
- [Interactive URL to WebP page](https://htmlcsstoimage.com/features/url-to-webp)
- [Plans and current limits](https://htmlcsstoimage.com/pricing.md)
