> For the complete documentation index, see [llms.txt](https://docs.magecomp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.magecomp.com/magento-2-webp-image-converter-extension/configuration.md).

# Configuration

Once the extension is installed successfully, make sure WebP Support and AVIF Support is enabled from PHP configuration.

<figure><img src="https://807210804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8wMgNeFnYjVGQmgdxMv4%2Fuploads%2Fpjqu1GPtD2DkamuUqXZp%2FPHP%20configuration.png?alt=media&amp;token=2b59cf80-6305-417b-8531-95d16a55aba0" alt=""><figcaption></figcaption></figure>

Now from your Magento admin, go to **Stores > Configuration** to configure the extension for use.

**Configuration**

<figure><img src="https://807210804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8wMgNeFnYjVGQmgdxMv4%2Fuploads%2Fv98zFSgQ68doXGzrP4tK%2FConfiguration.png?alt=media&amp;token=56183b91-bf4a-41ec-81e6-0f87e86317a9" alt=""><figcaption></figcaption></figure>

* **WebP Image Convert -** Enable the extension from here.

**General Settings**

<figure><img src="https://807210804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8wMgNeFnYjVGQmgdxMv4%2Fuploads%2FisJ0tnrZNx1DTvRaNna6%2FGeneral%20Settings.png?alt=media&amp;token=c134ed8e-7eb3-4258-bbb0-e5cd8b1d5bf1" alt=""><figcaption></figcaption></figure>

* **Product Page Image Type -** Select WebP or AVIF image type to show the main product image and product gallery in that format. If AVIF configuration is disabled, it will consider WebP by default.
* **Limit Number of Images -** Set the number of images to be optimized at a time using cron or manually.

**Scan Media**

<figure><img src="https://807210804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8wMgNeFnYjVGQmgdxMv4%2Fuploads%2FsPYdhGdXC5ttMJYjCMbJ%2FScan%20Media.png?alt=media&amp;token=a8dccda1-7eb9-464e-9b3e-25ab56e4d82b" alt=""><figcaption></figcaption></figure>

* **Enable Cron Image Scan -** Enable image scanning using the cron job from here.
* **Scan Schedule -** Set the frequency to scan new images from the media directory.
* **Included Directories -** Add directories to be considered for image optimization. The default directory is pub/media.
* **Excluded Directories -** Add directories to be ignored for image optimization. It is recommended to exclude directories with optimized images to avoid duplicate optimization.
* **Reset Errors on Scan -** The images that were not scanned before due to errors will be rescanned if this field is set to Yes.

**Optimization by Cron**

<figure><img src="https://807210804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8wMgNeFnYjVGQmgdxMv4%2Fuploads%2Fi3aGtoRQiXaGYXP7726V%2FOptimization%20by%20Cron.png?alt=media&amp;token=966143a3-0d61-45cd-b1a5-1eaa85926127" alt=""><figcaption></figcaption></figure>

* **Enable Cron Image Optimization -** Enable image optimization using the cron job from here.
* **Optimization Schedule -** Set the frequency to optimize new images from the media directory.
* **Server Load Limit -** Set value to pause optimization when server load is above this value. This is recommended for production sites to avoid site slowdown.

**Performance**

1. **WebP Conversion Configuration**

<figure><img src="https://807210804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8wMgNeFnYjVGQmgdxMv4%2Fuploads%2FFdkcK108a0ea1DEkssuM%2FWebP%20Conversion%20Configuration.png?alt=media&amp;token=8e770689-9705-42ef-b969-08998cf29458" alt=""><figcaption></figcaption></figure>

* **Enable WebP Conversion -** Enable WebP Image conversion form here.
* **WebP Quality -** Set the quality of WebP images from 0 to 100.

2. **AVIF Conversion Configuration**

<figure><img src="https://807210804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8wMgNeFnYjVGQmgdxMv4%2Fuploads%2FEl5k5XRQNB9b4jkxfxwR%2FAVIF%20Conversion%20Configuration.png?alt=media&amp;token=acdea636-d653-4eaa-ae19-cf69b5ade3d8" alt=""><figcaption></figcaption></figure>

* **Enable AVIF Conversion -** Enable AVIF Image conversion form here.
* **AVIF Quality -** Set the quality of AVIF images from 0 to 100.

3. **Responsive Images**

<figure><img src="https://807210804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8wMgNeFnYjVGQmgdxMv4%2Fuploads%2FMX66MO0Xc7IEemE329eT%2FResponsive%20Images.png?alt=media&amp;token=073b4fd8-61ab-40f0-bd14-bad125dda86e" alt=""><figcaption></figcaption></figure>

* **Enable Responsive Images -** Enable responsive images from here.
* **Image Breakpoints -** Set breakpoints to create responsive images.
* **Responsive Images Blacklist -** Add image names using comma to exclude from responsive optimization.

**NOTE -** Responsive images are only applied for CMS pages.
