Skip to content
Documentation
Plugin page
Troubleshooting

Delivery not working

  • Updated
  • Pixavif: v1.0.0
  • 2 min read
On this page

The delivery test loads a converted image the way a browser does. When it fails, images are converted but visitors still download the originals. Your site works either way; it is only slower than it could be.

What the test result means

Result What to do
Your server does not serve files from wp-content/uploads-pixavif A security rule blocks that folder. Allow it in your security plugin or ask your host. The folder only holds images.
Your server sends AVIF or WebP files with the wrong file type Add the types to your server. Apache: AddType image/avif .avif and AddType image/webp .webp. Nginx: add image/avif avif; to mime.types.
The server rules are missing from wp-content/uploads/.htaccess Save the Pixavif settings once. If it keeps happening, another plugin rewrites that file.
The server returned the original image Your server ignores .htaccess (nginx, or AllowOverride None). Use picture tags under Settings → Delivery, or add the nginx rules below.
This page comes from a cache saved before conversion Clear your page cache. See Page cache.
The page does not contain picture tags yet Turn on Also replace images outside post content under Settings → Delivery.

Theme builders: whole page mode

Elementor Pro, Divi, Beaver Themer, Bricks, Oxygen, Breakdance and Avada build headers, archives, loops and product grids outside the post content. Images there do not pass through the WordPress filters Pixavif uses by default, so they can stay JPEG or PNG while the delivery test still passes. When Pixavif finds one of these builders, the Overview suggests whole page mode. One click turns it on; it is the same switch as Also replace images outside post content under Settings → Delivery.

In whole page mode Pixavif reads the finished HTML of each page once, just before it is sent, and wraps every image that has a converted copy. Only image markup changes. Clear your page cache once after turning it on.

Missing width and height

Images without width and height make the page jump while it loads, which Google reports as Cumulative Layout Shift (CLS). With Add missing width and height on (Settings → Delivery, on by default), Pixavif fills them in for every image it wraps, using the real pixel size of that file from the Media Library. Values the theme set on purpose, such as 100%, are left alone, and the image keeps the size it had on the page. This works with picture tags; server rewrite does not change HTML.

Nginx

Nginx does not read .htaccess. Picture tags work on nginx without any setup. For server rewrite on nginx, the Server tab shows rules filled in with your own paths. They look like this:

map $http_accept $pixavif_avif {
    default "";
    "~*image/avif" ".avif";
}
map $http_accept $pixavif_webp {
    default "";
    "~*image/webp" ".webp";
}

location ~* ^/wp-content/uploads/(?<pixavif_path>.+\.(?:jpe?g|png|gif))$ {
    add_header Vary Accept;
    try_files /wp-content/uploads-pixavif/$pixavif_path$pixavif_avif /wp-content/uploads-pixavif/$pixavif_path$pixavif_webp $uri =404;
}

Reload nginx, then click Re-check on the Server tab. Once nginx serves the copies, Server rewrite can be selected under Settings → Delivery. Pixavif uses a named capture (pixavif_path) on purpose: with $1, the regex maps above would reset the capture and nginx would always serve the original.

Check it yourself

  1. Array

  2. Array

Was this page helpful?

Pixavif: AVIF & WebP Image Converter
Explore plugins