# Image Service (on-the-fly AVIF) for WordPress

> Serve every image at the exact width the screen needs, as AVIF or WebP when the browser supports it — generated on first request and cached, like an image…

TW-PRF-09 Performance


Serve every image at the exact width the screen needs, as AVIF or WebP when the browser supports it — generated on first request and cached, like an image CDN on your own server.

[Get it from $26 a year](https://togglework.app/pricing/#plans) [Try it in the demo](https://togglework.app/demo/)

Image Service (on-the-fly AVIF)

**Part number**
: TW-PRF-09
**Section**
: [Performance](https://togglework.app/features/performance/)
**Settings**
: 3 (1 on/off)
**Starts**
: Switched off
**In plans**
: Every plan

## Why it matters

Phones download the same large image as desktops unless every size has been generated, and many browsers could take AVIF, which is much smaller again. An image CDN fixes both, but costs a monthly fee and sends traffic elsewhere.

### What it does

- Serves each image at the width the screen needs.
- As AVIF (preferred) or WebP when the browser supports it.
- Generated on first request and cached on your server.
- Optional CDN host in front, as long as it forwards the Accept header.

![Image Service (on-the-fly AVIF) settings screen in the Toggleworks WordPress plugin, showing Prefer AVIF, Quality, CDN host (optional)](https://togglework.app/wp-content/themes/toggleworks-site/assets/img/parts/performance-image-service.webp?v=1795524215)

The Image Service (on-the-fly AVIF) screen in wp-admin, where you switch it on and change its settings.

## Set it up

1. Switch it on; AVIF is preferred where your server supports it.
2. Open a page on a phone and check images arrive as AVIF or WebP.

## What you can set

Switch Image Service (on-the-fly AVIF) on in Toggleworks → Performance, then adjust any of these. Each one starts with a default, so you can switch the part on first and fine-tune later.

- Prefer AVIF
- Quality
- CDN host (optional)

## Good to know

- The first request for each size does the work, so the very first visits are slower while the cache fills.

## One less plugin to install

Image Service (on-the-fly AVIF) does a job people often install a separate plugin for:

- Serving AVIF on the flyOften done with Smush

## Comes with 187 more parts

Image Service (on-the-fly AVIF) is one part of Toggleworks, a single plugin for security, speed, SEO, backups, email and store tools. Switch on what your site needs; the rest stays off and loads nothing.

[All 18 Performance parts](https://togglework.app/features/performance/)

### People also look for it as

- image cdn
- avif
- webp
- responsive images
- resize
- srcset
- speed

## Often switched on with it

- [Image Optimizer](https://togglework.app/features/performance/image-optimizer/) — TW-PRF-08 · Save uploaded JPEG and PNG images as WebP or AVIF, set the compression quality and downscale huge uploads. Uses your server's… · 5 settings
- [Bulk WebP Converter](https://togglework.app/features/performance/webp-converter/) — TW-PRF-18 · Convert your existing media library to WebP in the background and serve the smaller files automatically. Originals are kept, so… · 3 settings
- [Asset Manager](https://togglework.app/features/performance/asset-manager/) — TW-PRF-01 · See every CSS and JavaScript file a page loads and switch off the ones it does not need — on one page, everywhere, or everywhere… · Own screen in wp-admin
- [Image Sizes](https://togglework.app/features/performance/image-sizes/) — TW-PRF-10 · Stop generating image sizes the site never uses. Each upload creates fewer files, saving disk space and upload time. · 2 settings
- [Page Cache](https://togglework.app/features/performance/page-cache/) — TW-PRF-13 · Serves pages to visitors as ready-made HTML files before WordPress even starts — typically 5–20× faster. Logged-in users, carts… · 6 settings
- [AI Image Generator](https://togglework.app/features/ai/image-generator/) — TW-AI-13 · Generate featured images and illustrations from a sentence, or edit an image you already have (“remove the background”, “make it… · 7 settings

## Questions

**Is Image Service (on-the-fly AVIF) included in every Toggleworks plan?**

Yes. Every plan includes all 188 parts, Image Service (on-the-fly AVIF) among them. Plans differ only in how many sites you can use them on, and staging or local copies of a site don’t count.

**Does Image Service (on-the-fly AVIF) slow my site down when it’s switched off?**

No. Every part starts switched off, and a part that is off loads none of its code. Switch on Image Service (on-the-fly AVIF) only if your site needs it.

**What if a setting locks me out?**

Add `define( 'TOGGLEWORKS_SAFE_MODE', true );` to wp-config.php. It pauses every part until you remove the line, and Tools → Recent changes lets you undo a change.

**Can I try Image Service (on-the-fly AVIF) before I buy?**

Yes. The [live demo](https://togglework.app/demo/) runs a WordPress site with Toggleworks in your browser, and every plan has a 14-day refund.

## Switch off the plugin pile.

All 188 parts, one license, updates and support. 14-day refund.

[Choose a plan](https://togglework.app/pricing/#plans) [Try the live demo](https://togglework.app/demo/)

---

Source: https://togglework.app/features/performance/image-service/
