CompressX Documentation

Everything you need to install, configure, and get the best performance from CompressX Free and Pro.

CompressX Docs
Document Notice

Help Improve the Documentation

If you notice something unclear, outdated, or incorrect, feel free to let us know.

Your feedback helps keep the documentation accurate and useful for everyone.

How the Filename Convention Works in CompressX

Mar 26, 2026 | Docs

CompressX generates optimized images using the following filename format:
image_name.png.avif
This is a deliberate architectural decision based on NextGen rewrite mode, designed to provide maximum compatibility, safe file mapping, and stable delivery inside WordPress.

Why CompressX Uses image_name.png.avif

1. The Original Extension Must Be Preserved

Tip
The original extension must be preserved Unless images are renamed at upload time and the new filename (e.g. image_name.avif) is stored everywhere in the WordPress database, the original extension must be preserved.
This workflow is not currently supported by CompressX.

In WordPress and on the server filesystem, files are identified by their full filename, not just by the basename.
For example:

image_name.png
image_name.jpg

These are two completely different files with a same basename image_name.
If CompressX removed the original extension and generated only:

image_name.webp
image_name.avif

This creates filename ambiguity and can lead to:

  • incorrect source file detection.
  • wrong rewrite mapping.
  • broken media associations.
  • unreliable fallback behavior.
  • wrong image delivery in some cases.

By keeping the original extension in the optimized filename:

image_name.png.avif

CompressX can always preserve a clear one-to-one relationship between the source file and the converted file.

2. WordPress Stores the Original URL in the Database

WordPress stores image references in the database using the original file URL, such as:
image_name.png
That exact URL can be used across the entire site, including:

  • 1. themes
  • 2. plugins
  • 3. page builders
  • 4. post content
  • 5. custom fields
  • 6. external integrations

If the optimized filename were changed to: image_name.avif
WordPress would not automatically understand that it should replace the original URL.
That would often result in:

  • broken image references
  • 404 errors
  • compatibility issues
  • unexpected behavior in third-party plugins
Tip
Completely replacing original image URLs (e.g. converting image_name.png to image_name.avif) across a WordPress site is extremely difficult and risky.