---
title: Using Fastly Image Optimizer
summary: null
url: >-
  https://www.fastly.com/documentation/guides/full-site-delivery/image-optimization/using-fastly-image-optimizer
---

To use the Fastly Image Optimizer (Fastly IO), [enable the product](https://www.fastly.com/documentation/guides/full-site-delivery/image-optimization/using-fastly-image-optimizer#enabling-and-disabling-the-fastly-image-optimizer) directly in the Fastly control panel or via the API. Once enabled, Fastly IO will immediately begin transforming and serving images at the edge according to the default settings. You can [configure the default settings](https://www.fastly.com/documentation/guides/full-site-delivery/image-optimization/using-fastly-image-optimizer#configuring-default-image-settings) to further customize how images are treated by Fastly. You can also [test](https://www.fastly.com/documentation/guides/full-site-delivery/image-optimization/using-fastly-image-optimizer#testing-image-optimizer) image transformations to see how they work before you change your image URLs.

## Before you begin

Before you begin using Fastly IO, be sure to review the [prerequisites and considerations](https://www.fastly.com/documentation/guides/full-site-delivery/image-optimization/about-fastly-image-optimizer). Also, understand that Image Optimizer is available on the Compute platform through our SDKs as part of Fastly's [Beta program](https://docs.fastly.com/products/fastly-product-lifecycle#beta). Any request sent to Image Optimizer, including through the SDK, counts as a [billable image request](https://docs.fastly.com/products/image-optimizer#billing) for the Image Optimizer product.

## Enabling and disabling Image Optimizer

Fastly Image Optimizer can be enabled or disabled by [any superuser or engineer](https://www.fastly.com/documentation/guides/account-info/user-and-account-management/about-user-roles-and-permissions).

> **WARNING:** Enabling or disabling Fastly IO on a service immediately impacts all service versions, including the active one.

### Enabling Image Optimizer

> **NOTE:** To use Image Optimizer with Compute as part of Fastly's [Beta program](https://docs.fastly.com/products/fastly-product-lifecycle#beta), [contact support](https://support.fastly.com).

Follow the steps below enable Fastly IO from the Service configuration tab.

> **TIP:** You can also enable Fastly IO from the [Products page](https://www.fastly.com/documentation/guides/account-info/billing/managing-product-purchases-and-trials/) or [via the API](https://www.fastly.com/documentation/reference/api/products/image_optimizer/#enable-product-image-optimizer).

1.   Log in to the [Fastly control panel](https://manage.fastly.com).

2.   From the [**Home**](https://manage.fastly.com/home) page, select the appropriate service. You can use the search box to search by ID, name, or domain.

3.   Click **Edit configuration** and then select the option to clone the active version.

4. Click **Enable Image Optimizer**.
5. Read through the pricing and purchase details, then follow the prompts to enter your billing and credit card information.
6. Click **Complete purchase**.
7. From the Fastly control panel, use the **Fallback location** menu to select the geographic location closest to the origin where your images are stored. This will help determine the optimal shield location for any requests for Image Optimizer transformations that need to go back to an origin that doesn't have shielding enabled.
8. Click **Enable Image Optimizer**.
9. Click **Enable on all versions** to confirm you want to enable Fastly IO.

   > **HINT:** Click **Don't show this again** to disable the confirmation window.

### Disabling Image Optimizer

Follow the steps below disable Fastly IO from the Service configuration tab.

> **TIP:** You can also disable Fastly IO from the [Billing page](https://www.fastly.com/documentation/guides/account-info/billing/about-the-billing-overview-page/#about-purchased-products) or [via the API](https://www.fastly.com/documentation/reference/api/products/image_optimizer/#disable-product-image-optimizer).

1.   Log in to the [Fastly control panel](https://manage.fastly.com).

2.   From the [**Home**](https://manage.fastly.com/home) page, select the appropriate service. You can use the search box to search by ID, name, or domain.

3.   Click **Edit configuration** and then select the option to clone the active version.

4. Click **Image Optimizer**.
5. Click **Disable Image Optimizer**.
6. Click **Disable on all versions** to confirm you want to disable Fastly IO.

   > **HINT:** Click **Don't show this again** to disable the confirmation window.

## Testing Image Optimizer

Once you've enabled Fastly IO, you can test image transformations by adding query string parameters to a test URL so you can see exactly how they work before you change your image URLs.

Copy the URL provided in the Fastly control panel and paste it in a web browser followed by the image transformation you want to apply. Our [Fastly IO documentation](https://www.fastly.com/documentation/reference/io/) describes each of the available image transformations in detail and includes the exact pattern you can add to URLs, along with a description and example of how to use each parameter and its values.

## Configuring default image settings

Fastly IO supports a variety of [image formats](https://www.fastly.com/documentation/reference/io/#limitations-and-constraints) and applies specific settings to all images by default. Use the Fastly control panel to review and adjust the default settings as appropriate. Changes to other image settings, including most image transformations, require [using query string parameters](https://www.fastly.com/documentation/guides/full-site-delivery/image-optimization/using-fastly-image-optimizer#using-advanced-image-settings).

To review and edit the default image settings via the control panel, follow the steps below:

1.   Log in to the [Fastly control panel](https://manage.fastly.com).

2.   From the [**Home**](https://manage.fastly.com/home) page, select the appropriate service. You can use the search box to search by ID, name, or domain.

3.   Click **Edit configuration** and then select the option to clone the active version.

4. Click **Image Optimizer**.

5. Click **Edit settings**.

6. In the **Fallback location** section, use the menu to select the geographic location closest to the origin where your images are stored.

7. In the **WebP settings** section, use the following settings to control how WebP images are treated by Fastly IO:

   - From the **Auto WebP** field, select **Yes** to convert images to the WebP format in browsers that support it or **No** to use the image file type instead.
   - In the **Default WebP (lossy) quality** field, enter the compression level for lossy file-formatted images. Fastly uses `85` for the default quality but you can specify any whole number between `1` and `100`.

8. In the **JPEG settings** section, use the following settings to control how JPEG images are treated by Fastly IO:

   - From the **Default JPEG format** field, select the JPEG type to use when delivering the image. By default, Fastly sets the JPEG type to **Auto** to deliver images with the output type matching the input type. You can also select **Baseline** to display the image line by line starting from top left and going to the bottom right, or **Progressive** to display a blurry image that becomes clear as it loads.
   - In the **Default JPEG quality** field, enter the compression level for quality of lossy file formats. Fastly uses `85` for the default quality but you can specify any whole number between `1` and `100`.

9. In the **Resizing & scaling** section, use the following settings to control how images are resized and scaled in Fastly IO:

   - From the **Resize filter** field, select the image quality filter to use when resizing and generating new images to use a higher or lower number of pixels. By default, Fastly uses the **Lanczos3** filter. You can also choose **Lanczos2**, **Bicubic**, **Bilinear**, and **Nearest**.
   - From the **Allow upscaling** field, leave the settings at their default or select **Yes** to return images larger than the original source file so they can fit the requested dimensions.

10. In the **GIF to video conversion** section, use the **Enable Animated GIF to Video** field to indicate whether to enable animated GIF to video functionality. When set to **Yes**, each video frame is counted and charged as an image optimizer request.

11. Click the **Advanced** menu to adjust the **File type and routing** settings. By default, all files with PNG, JPG, JPEG, GIF, and WEBP extensions are processed via Fastly IO. Select **Advanced** if you're [using custom VCL](https://www.fastly.com/documentation/guides/full-site-delivery/image-optimization/advanced-image-optimization-setup) to specify the file types to be processed.

12. Click **Save**.

13. Activate your service.

## What's next

Check out the [Image Optimizer reference documentation](https://www.fastly.com/documentation/reference/io/) to learn about the different parameters you can apply to transform your images.

> **NOTE:** 
>
> This article describes a product that may use third-party cloud infrastructure to process or store content or requests for content. For more information, check out our [cloud infrastructure security and compliance program](https://docs.fastly.com/products/security-program).
>
>

## Related content

- [Image optimization debugging](https://www.fastly.com/documentation/reference/io/#testing-and-debugging)
- [Image Optimizer API documentation](https://www.fastly.com/documentation/reference/api/products/image_optimizer/)
- [Image Optimizer Default Settings API documentation](https://www.fastly.com/documentation/reference/api/services/image-optimizer-default-settings/)
