Back to Community

Why Are My Images Named 'webpc-passthru.php.webp'? (And How to Fix It)

Content

A common question from users of the 'Converter for Media – Optimize images | Convert WebP & AVIF' plugin is about the filename that appears when an image is downloaded. Instead of seeing a familiar name like my-photo.jpg, users often find the file is saved as webpc-passthru.php.webp. This can be confusing and is a frequent point of confusion.

Why This Happens

This behavior is not a bug but is directly related to the plugin's Pass Thru mode. This is one of the methods the plugin uses to deliver modern image formats (like WebP and AVIF) to compatible browsers. In Pass Thru mode, image requests are routed through a PHP script (webpc-passthru.php), which handles the format conversion and delivery on the fly. The script's name becomes part of the downloaded file's name, resulting in the webpc-passthru.php.webp format.

The Primary Solution: Use .htaccess Mode

The 'Converter for Media' team suggests that the preferred and recommended method for image delivery is via .htaccess mode. When this mode is active and configured correctly, the server itself handles the image redirection transparently. This means browsers that support WebP/AVIF will receive the converted image, while the original image URL and filename are preserved. When a user downloads an image, it will retain its original name (e.g., my-photo.webp).

What If I Use NGINX?

A common follow-up question is from users whose servers run on NGINX, which does not use .htaccess files. The solution is similar in principle but requires server-level configuration. You must manually add rewrite rules to your NGINX server configuration to replicate the functionality of the .htaccess mode. The 'Converter for Media' team suggests that this is entirely possible, and many users successfully run the plugin on NGINX. You may need to consult your hosting provider's documentation or support to implement the correct NGINX rewrite rules.

Key Takeaways

  • The webpc-passthru.php.webp filename occurs when using the plugin's Pass Thru mode.
  • The standard solution is to switch to and configure via .htaccess mode.
  • For NGINX servers, you must configure server rewrite rules manually instead of using a .htaccess file.
  • Using the recommended server-level mode (via .htaccess or NGINX config) not only fixes the filename issue but is also generally more efficient for website performance.