Title: AttiaWebP &#8211; Safe WebP Replace &amp; Optimizer
Author: ahmedattia15
Published: <strong>July 4, 2026</strong>
Last modified: July 5, 2026

---

Search plugins

![](https://ps.w.org/attiawebp-safe-webp-replace-optimizer/assets/banner-772x250.
png?rev=3591946)

![](https://ps.w.org/attiawebp-safe-webp-replace-optimizer/assets/icon-256x256.png?
rev=3591946)

# AttiaWebP – Safe WebP Replace & Optimizer

 By [ahmedattia15](https://profiles.wordpress.org/ahmedattia15/)

[Download](https://downloads.wordpress.org/plugin/attiawebp-safe-webp-replace-optimizer.1.2.1.zip)

 * [Details](https://wordpress.org/plugins/attiawebp-safe-webp-replace-optimizer/#description)
 * [Reviews](https://wordpress.org/plugins/attiawebp-safe-webp-replace-optimizer/#reviews)
 *  [Installation](https://wordpress.org/plugins/attiawebp-safe-webp-replace-optimizer/#installation)
 * [Development](https://wordpress.org/plugins/attiawebp-safe-webp-replace-optimizer/#developers)

 [Support](https://wordpress.org/support/plugin/attiawebp-safe-webp-replace-optimizer/)

## Description

AttiaWebP helps site owners convert JPEG and PNG media library images into WebP (
and optionally AVIF) using the image tools available on their own WordPress server.

The default mode is conservative: it creates WebP copies next to the original files
and keeps the original JPEG/PNG files untouched. Optional server-level delivery 
can serve matching WebP/AVIF sidecar files without rewriting front-end HTML, WooCommerce
product markup, widgets, or content.

Advanced replacement tools are included for site owners who want a one-image WebP
media library. These tools are disabled by default and require explicit confirmation
before deleting original JPEG/PNG files or generated image sizes.

Main features:

 * Automatically create WebP files after new JPEG/PNG uploads.
 * Optional AVIF sidecar generation alongside WebP when the server supports AVIF
   encoding.
 * Bulk convert existing media library images in safe, time-budgeted batches with
   a live progress bar and a Stop button.
 * Background conversion mode that keeps working on the server through WP-Cron after
   the browser tab is closed.
 * Media Library integration: a WebP status column, per-image savings, a one-click
   Convert/Regenerate button, and a bulk action.
 * Estimated bandwidth savings on the dashboard, calculated from real sidecar files
   on disk.
 * Exclusion patterns to skip specific folders or file names during conversion.
 * Cursor-based bulk processing designed for large media libraries.
 * Upload-file statistics for JPEG/PNG, WebP, WebP sidecar conversions, and AVIF
   files.
 * Optional server-level WebP/AVIF delivery through a managed uploads `.htaccess`
   rules block on Apache/LiteSpeed servers, plus a copy-paste Nginx example.
 * WP-CLI commands for status, conversion, replacement, and marker resets.
 * A small on-screen log of recent conversion errors.
 * Optional single image mode for future uploads.
 * Optional permanent replacement mode that updates media items to WebP and deletes
   old JPEG/PNG files after explicit confirmation.
 * Quality control for WebP (default 82) and AVIF (default 60).
 * Option to skip generated files when they are larger than the source file.
 * No external API calls and no third-party tracking.

Important: Always create a full backup before using permanent replacement tools.
Replacement mode deletes original JPEG/PNG files and generated image sizes after
successful WebP conversion.

### Developers

WP-CLI commands:

 * `wp attiawebp status` – Shows support details, pending counts, and background
   state.
 * `wp attiawebp convert [--limit=<n>] [--force]` – Creates WebP/AVIF sidecars for
   pending attachments.
 * `wp attiawebp replace --confirm=DELETE-ORIGINALS [--limit=<n>]` – Runs the permanent
   replacement flow.
 * `wp attiawebp reset-markers [--which=sidecar|replace]` – Clears conversion or
   skip markers.

Filters:

 * `aawo_conversion_quality( int $quality, string $source_path, string $target_mime)`–
   Adjusts quality per file or per target format.
 * `aawo_should_convert_file( bool $allowed, string $relative_path, string $absolute_path)`–
   Skips or allows specific files. The second argument is the path relative to uploads.
 * `aawo_delivery_rules( string $rules )` – Modifies the managed `.htaccess` rules
   block. The returned block must keep the BEGIN and END AttiaWebP markers.
 * `aawo_batch_time_budget( float $seconds )` – Changes the per-batch time budget
   for bulk processing.
 * `aawo_rating_notice_threshold( int $threshold )` – Changes how many WebP files
   must exist before the review invitation shows on the plugin screen. Return a 
   very large number to effectively disable the notice.

### Privacy

AttiaWebP does not send images, site data, or usage data to external services. All
conversion work happens locally on the WordPress server.

## Installation

 1. Upload the plugin folder to `/wp-content/plugins/` or install the ZIP through Plugins
    > Add New > Upload Plugin.
 2. Activate the plugin through the Plugins screen in WordPress.
 3. Open Settings > AttiaWebP WebP Optimizer.
 4. Review the settings and save your preferred configuration.
 5. Use the safe bulk conversion tool, the background mode, or the Media Library column
    to create WebP copies for existing media.

## FAQ

### Does this plugin delete my original images by default?

No. By default, the plugin creates WebP copies and leaves JPEG/PNG originals untouched.

### Can it replace originals with WebP?

Yes, but only through advanced options. Permanent replacement is disabled by default
and requires a confirmation checkbox plus the exact text DELETE ORIGINALS before
bulk replacement can run.

### What is AVIF and should I enable it?

AVIF is a newer image format that is usually smaller than WebP at similar visual
quality. If the settings screen shows AVIF support, you can enable AVIF sidecars
so the server can deliver AVIF to browsers that accept it, WebP to older browsers,
and the original file to everything else. AVIF encoding is slower than WebP, so 
background mode is recommended for large libraries.

### Why is the AVIF option disabled?

Your server cannot encode AVIF. AVIF generally requires WordPress 6.5+ together 
with GD on PHP 8.1+ or an Imagick build with AVIF support. Ask your host about enabling
it.

### What does quality 82 mean?

It is the WebP compression quality value. Lower values create smaller files with
more visible compression. Higher values preserve more detail but create larger files.
The default value of 82 is a balanced starting point. AVIF uses its own quality 
setting with a default of 60, which is roughly comparable visually.

### Does it use an external service?

No. Conversion uses the image editor available on the WordPress server, such as 
GD or Imagick.

### Will this work on every host?

The server must support WebP through GD or Imagick. The settings screen shows a 
basic support check for both WebP and AVIF.

### What is background conversion?

Background mode schedules small conversion batches through WP-Cron, so conversion
continues on the server even after you close the settings page. The settings screen
shows live progress and a stop button. Note that WP-Cron depends on site traffic
unless a real cron job is configured.

### Does server delivery work on Nginx?

The built-in toggle manages an uploads `.htaccess` block, which is for Apache/LiteSpeed
environments. For Nginx, the settings screen now includes an example server-block
snippet you can copy into your Nginx configuration manually.

### Does server delivery change my WooCommerce product HTML?

No. Server delivery does not rewrite product HTML, image src attributes, srcset 
values, content, widgets, or custom CSS. It only lets the server return a matching
WebP/AVIF file for JPEG/PNG requests when the browser supports the format and a 
matching sidecar file exists.

### How do I exclude certain images?

Add patterns to the Exclusions box, one per line, matched against the path relative
to the uploads folder. `*` works as a wildcard, for example `2024/private/*` or `*-
logo.png`.

### What happens if two images share a name, like photo.jpg and photo.png?

Both map to the same photo.webp sidecar file. The first conversion creates it, the
second is treated as already existing, and server delivery serves that one shared
WebP file for both requests. Rename one of the files or add an exclusion pattern
if you need separate WebP copies.

### Does uninstalling delete my WebP and AVIF files?

No. Uninstalling removes the plugin options, attachment markers, background state,
dismissal flags, and the managed uploads `.htaccess` block, but generated WebP/AVIF
image files are kept on disk for safety. Delete them manually if you no longer want
them.

### Should I use permanent replacement on a live store?

Only after testing on staging and creating backups. Some themes, builders, or stores
may rely on generated image sizes.

## Reviews

![](https://secure.gravatar.com/avatar/8bb7837888c6992324851f18dfc2d433b523c7ad13f72d0f275d361bbbf0206e?
s=60&d=retro&r=g)

### 󠀁[The Most Logical and Reliable WebP Solution for WordPress](https://wordpress.org/support/topic/the-most-logical-and-reliable-webp-solution-for-wordpress/)󠁿

 [medoapoali](https://profiles.wordpress.org/medoapoali/) July 4, 2026

This plugin doesn’t reinvent the wheel, but it rearranges the process in a more 
rational way than most competitors. It isn’t absolutely ‘the best,’ but it is certainly
the cleanest in terms of server-side architecture.

![](https://secure.gravatar.com/avatar/edf1cc2402519240a785caaccaa6933a39c243bcc246120e8f925659cca751c2?
s=60&d=retro&r=g)

### 󠀁[Excellent Plugin and Easy to Use](https://wordpress.org/support/topic/excellent-plugin-and-easy-to-use-14/)󠁿

 [ahmedattia15](https://profiles.wordpress.org/ahmedattia15/) July 4, 2026

Great plugin and easy to use. It helped me achieve what I needed without complicated
settings. The interface is clear, and the plugin works well with my WordPress website.
I appreciate the effort from the developer and recommend it to anyone looking for
this feature.

 [ Read all 2 reviews ](https://wordpress.org/support/plugin/attiawebp-safe-webp-replace-optimizer/reviews/)

## Contributors & Developers

“AttiaWebP – Safe WebP Replace & Optimizer” is open source software. The following
people have contributed to this plugin.

Contributors

 *   [ ahmedattia15 ](https://profiles.wordpress.org/ahmedattia15/)

[Translate “AttiaWebP – Safe WebP Replace & Optimizer” into your language.](https://translate.wordpress.org/projects/wp-plugins/attiawebp-safe-webp-replace-optimizer)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/attiawebp-safe-webp-replace-optimizer/),
check out the [SVN repository](https://plugins.svn.wordpress.org/attiawebp-safe-webp-replace-optimizer/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/attiawebp-safe-webp-replace-optimizer/)
by [RSS](https://plugins.trac.wordpress.org/log/attiawebp-safe-webp-replace-optimizer/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.2.1

 * Added one-click review links: a Review this plugin button next to the settings
   page title, a neutral review link on the Plugins screen row, and a review invitation
   in the settings page footer.
 * Added a polite, dismissible review notice that appears on the plugin screen only,
   and only after the plugin has created at least ten WebP files. Remind me later
   snoozes it for thirty days per user, and I already left a review hides it permanently.
 * Added the aawo_rating_notice_threshold filter to raise, lower, or effectively
   disable the review notice.
 * Fixed the stored attachment file size after permanent WebP replacement, so the
   Media Library and REST API report the new WebP size instead of the old JPEG/PNG
   size.
 * Fixed a double-unslash in the exclusion patterns sanitizer that could strip backslashes
   from saved patterns.
 * Fixed duplicate admin notices after saving settings on the plugin screen.
 * Fixed the Media Library WebP badge so items completed with skip-larger skips 
   no longer look partially converted forever.
 * Fixed the single-image convert action so it no longer checks permissions against
   an empty attachment ID, which raised a debug notice on WordPress 6.1 and later.
 * Background runs now resume automatically if the scheduled cron event is lost,
   instead of blocking manual runs until stopped by hand.
 * Re-activating the plugin now restores the uploads .htaccess delivery rules when
   server delivery is enabled in the saved settings.
 * Hook callbacks on shared WordPress filters now tolerate unexpected values from
   other plugins instead of raising fatal type errors.
 * The upload statistics scanner now skips unreadable folders and briefly caches
   partial results instead of rescanning on every page load.
 * Corrected the developer filter signatures documented in this readme and documented
   the shared-name WebP collision and the uninstall file behavior.

#### 1.2.0

 * Added optional AVIF sidecar generation with its own quality setting and server
   support detection.
 * Added a Media Library WebP column with status badges, per-image savings, a one-
   click Convert/Regenerate button, and a bulk action.
 * Added background conversion through WP-Cron with live progress, so large libraries
   convert without keeping the tab open.
 * Added a progress bar, a Stop button, and per-batch counters to the interactive
   bulk tools.
 * Added an estimated bandwidth savings card based on real sidecar files on disk.
 * Added exclusion patterns to skip folders or file names during conversion.
 * Added WP-CLI commands: status, convert, replace, and reset-markers.
 * Added AVIF-aware server-delivery rules and a copy-paste Nginx configuration example
   for non-Apache servers.
 * Added a capped on-screen log of recent conversion errors with a clear action.
 * Added reset tools for conversion markers and previously skipped replacements.
 * Batches now respect the PHP time limit and stop early instead of timing out on
   slow hosts.
 * Added developer filters for quality, file exclusion, delivery rules, and batch
   time budget.
 * Added an RTL admin stylesheet.

#### 1.1.1

 * Hardened server-delivery rule management and avoided creating an empty uploads`.
   htaccess` file when delivery is disabled.
 * Added admin notices when server-delivery rules cannot be written.
 * Reworked bulk processing to use cursor-based batches instead of loading every
   attachment ID into memory.
 * Added cached upload-file statistics with a manual refresh link.
 * Disabled bulk buttons when WebP support is not available on the server.
 * Refreshed the translation template and WordPress.org package metadata.

#### 1.1.0

 * Added optional server-level WebP delivery using managed uploads `.htaccess` rules.
 * Kept front-end HTML rewriting disabled to avoid theme, WooCommerce, WPML, and
   cache-plugin conflicts.

#### 1.0.1

 * Safe store build: disabled front-end URL rewriting and added real upload-file
   statistics.

#### 1.0.0

 * Initial public release.

## Meta

 *  Version **1.2.1**
 *  Last updated **14 hours ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.0 or higher **
 *  Tested up to **7.0**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [AVIF](https://wordpress.org/plugins/tags/avif/)[images](https://wordpress.org/plugins/tags/images/)
   [optimization](https://wordpress.org/plugins/tags/optimization/)[performance](https://wordpress.org/plugins/tags/performance/)
   [webp](https://wordpress.org/plugins/tags/webp/)
 *  [Advanced View](https://wordpress.org/plugins/attiawebp-safe-webp-replace-optimizer/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  2 5-star reviews     ](https://wordpress.org/support/plugin/attiawebp-safe-webp-replace-optimizer/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/attiawebp-safe-webp-replace-optimizer/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/attiawebp-safe-webp-replace-optimizer/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/attiawebp-safe-webp-replace-optimizer/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/attiawebp-safe-webp-replace-optimizer/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/attiawebp-safe-webp-replace-optimizer/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/attiawebp-safe-webp-replace-optimizer/reviews/)

## Contributors

 *   [ ahmedattia15 ](https://profiles.wordpress.org/ahmedattia15/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/attiawebp-safe-webp-replace-optimizer/)