Mode 1 — Picture tag (default, recommended)
<picture>
<source>
- Works on every hosting — no server configuration at all.
- Cache-safe by design — the HTML is identical for every visitor, so page caches (FlynCache Purge, FastCGI cache, Cloudflare, hosts' built-in caches) never serve the wrong variant.
- Preserves alt text, width/height attributes, srcset and lazy loading.
This is the default for a reason: if you do not want to think about serving, stop reading and keep this mode.
Mode 2 — Server rewrite (fastest)
Accept
Apache and LiteSpeed
nginx
Help tab
# /etc/nginx/conf.d/wac-serve.conf
map $http_accept $wac_img_ext {
default '';
'~*image/avif' '.avif';
'~*image/webp' '.webp';
}
# inside each server { } block of your site:
location ~* ^(?<wac_img_path>/wp-content/uploads/.+)\.(jpe?g|png|gif)$ {
expires 30d;
access_log off;
add_header Vary Accept;
try_files $wac_img_path$wac_img_ext $uri =404;
}
nginx -t
Vary: Accept
Mode 3 — URL swap (legacy)
The oldest trick: PixSpeed rewrites image URLs inside your HTML to point directly at the variant files. It works everywhere and needs no server changes, but the HTML now differs per capability — and unless your cache is Accept-aware, a cached page can serve stale URLs after a bulk conversion. If you use this mode, purge your page cache after converting (the dashboard button handles FlynCache in one click). It is kept for compatibility; new sites should use Picture tag or Server rewrite.
Side-by-side comparison
| Picture tag | Server rewrite | URL swap | |
|---|---|---|---|
| Config needed | None | .htaccess (auto) / nginx snippet | None |
| Page-cache safe | Yes — HTML identical | Yes — HTML identical | Purge after bulk runs |
| HTML weight | Slightly larger (sources added) | Unchanged | Unchanged |
| Delivery | Browser picks format | Server picks format | URL rewritten |
| Best for | Everyone, managed hosts | VPS/dedicated, max speed | Legacy setups |
How to choose in 10 seconds
- Managed/shared hosting, no server access? → Picture tag. Done.
- Own the server (VPS/dedicated) and want maximum speed? → Server rewrite; use the nginx snippet or let Apache handle it automatically.
- Already running URL swap on an old setup? → It works, but plan a move to Picture tag when convenient.
Always verify after switching
serving test troubleshooting guide FlynCache Purge supportFrequently asked questions
Can I switch serving modes later?
Yes, any time, without re-converting anything. Serving mode only decides how variants are delivered — the generated .webp and .avif files are identical regardless of the mode.
Does the Picture tag mode hurt SEO?
No. Alt text, dimensions, srcset and lazy loading are preserved, and search engines index the original file exactly as before. Google explicitly documents the picture element as a valid way to serve next-gen formats.
Which mode is best on nginx hosting?
Server rewrite is the fastest if you can edit the server config — copy the map and location snippet from the PixSpeed Help tab into your nginx configuration, test with nginx -t and reload. If you cannot touch server config, Picture tag is the better pick: zero config, fully cache-safe.



