In this tutorial, we will show you how you can save storage and web traffic using the WebP image file format. The WebP is an image file format smaller than JPEG with comparable quality. To follow along, you can get the sample file here.

  1. Create Scenario
  2. Add WebP Endpoint
  3. Add Source File
  4. Disable Async Mode
  5. Run Scenario
  6. Output Files

Step 1 – Create Scenario

To get started, let’s create a Scenario and choose the Make an API Call module.

Add Make An API Call Module

Step 2 – Add WebP Endpoint

In the API Endpoint Path field, enter the /v1/pdf/convert/to/webp endpoint. You can learn more about the endpoint here.

Add PDF To WebP Endpoint

Step 3 – Add Source File

In the Input Type field, let’s select the Override URL param with the value option. This will allow us to manually enter the sample file link. Then, enter the file link in the Url field. Here‘s the link to the sample file.

Add PDF Source File

Step 4 – Disable Async Mode

In the Forcely enable async mode field, choose the No, rely on the async param in the Body option. Our sample file is only 329 KB which can be processed instantaneously.

Disable Async Mode

Step 5 – Run Scenario

Now, let’s Run the Scenario.

Run Scenario

Step 6 – Output Files

Great! We converted the PDF to WebP files successfully. The 2-page 329KB PDF file has been reduced to 2 separate WebP files with 62KB and 69KB sizes.

PDF To WebP Output
PDF to WebP Output

In this tutorial, you learned how to save web traffic for users viewing your documents using WebP. You also learned how to use the Make an API Call module to convert a PDF document to WebP.