{"id":328639,"date":"2026-07-04T02:04:40","date_gmt":"2026-07-04T02:04:40","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/attiawebp-safe-webp-replace-optimizer\/"},"modified":"2026-07-05T03:44:45","modified_gmt":"2026-07-05T03:44:45","slug":"attiawebp-safe-webp-replace-optimizer","status":"publish","type":"plugin","link":"https:\/\/bn-in.wordpress.org\/plugins\/attiawebp-safe-webp-replace-optimizer\/","author":23519341,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.2.1","stable_tag":"1.2.1","tested":"7.0","requires":"6.0","requires_php":"7.4","requires_plugins":null,"header_name":"AttiaWebP - Safe WebP Replace & Optimizer","header_author":"Ahmed Attia","header_description":"Converts JPEG\/PNG images to WebP, optionally replaces originals after explicit confirmation, and serves WebP copies when available.","assets_banners_color":"40839c","last_updated":"2026-07-05 03:44:45","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"","rating":5,"author_block_rating":0,"active_installs":0,"downloads":86,"num_ratings":2,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.1.1":{"tag":"1.1.1","author":"ahmedattia15","date":"2026-06-30 21:08:37"},"1.2.0":{"tag":"1.2.0","author":"ahmedattia15","date":"2026-07-04 02:04:24"},"1.2.1":{"tag":"1.2.1","author":"ahmedattia15","date":"2026-07-05 03:44:45"}},"upgrade_notice":{"1.2.1":"<p>Adds one-click review links plus a polite review invitation, and fixes the stored file size after permanent replacement, exclusion pattern sanitizing, duplicate settings notices, the Media Library WebP badge, and stalled background runs. Recommended for all users.<\/p>","1.2.0":"<p>Major update: AVIF sidecars, Media Library tools, background conversion, savings statistics, WP-CLI commands, Nginx delivery example, and exclusion patterns. Settings are preserved; review the new options after updating.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":2},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3591946,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3591946,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3591946,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3591946,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.1.1","1.2.0","1.2.1"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[194661,163,187,247,15376],"plugin_category":[50,52,54],"plugin_contributors":[269646],"plugin_business_model":[],"class_list":["post-328639","plugin","type-plugin","status-publish","hentry","plugin_tags-avif","plugin_tags-images","plugin_tags-optimization","plugin_tags-performance","plugin_tags-webp","plugin_category-media","plugin_category-performance","plugin_category-security-and-spam-protection","plugin_contributors-ahmedattia15","plugin_committers-ahmedattia15"],"banners":{"banner":"https:\/\/ps.w.org\/attiawebp-safe-webp-replace-optimizer\/assets\/banner-772x250.png?rev=3591946","banner_2x":"https:\/\/ps.w.org\/attiawebp-safe-webp-replace-optimizer\/assets\/banner-1544x500.png?rev=3591946","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/attiawebp-safe-webp-replace-optimizer\/assets\/icon-128x128.png?rev=3591946","icon_2x":"https:\/\/ps.w.org\/attiawebp-safe-webp-replace-optimizer\/assets\/icon-256x256.png?rev=3591946","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>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.<\/p>\n\n<p>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.<\/p>\n\n<p>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.<\/p>\n\n<p>Main features:<\/p>\n\n<ul>\n<li>Automatically create WebP files after new JPEG\/PNG uploads.<\/li>\n<li>Optional AVIF sidecar generation alongside WebP when the server supports AVIF encoding.<\/li>\n<li>Bulk convert existing media library images in safe, time-budgeted batches with a live progress bar and a Stop button.<\/li>\n<li>Background conversion mode that keeps working on the server through WP-Cron after the browser tab is closed.<\/li>\n<li>Media Library integration: a WebP status column, per-image savings, a one-click Convert\/Regenerate button, and a bulk action.<\/li>\n<li>Estimated bandwidth savings on the dashboard, calculated from real sidecar files on disk.<\/li>\n<li>Exclusion patterns to skip specific folders or file names during conversion.<\/li>\n<li>Cursor-based bulk processing designed for large media libraries.<\/li>\n<li>Upload-file statistics for JPEG\/PNG, WebP, WebP sidecar conversions, and AVIF files.<\/li>\n<li>Optional server-level WebP\/AVIF delivery through a managed uploads <code>.htaccess<\/code> rules block on Apache\/LiteSpeed servers, plus a copy-paste Nginx example.<\/li>\n<li>WP-CLI commands for status, conversion, replacement, and marker resets.<\/li>\n<li>A small on-screen log of recent conversion errors.<\/li>\n<li>Optional single image mode for future uploads.<\/li>\n<li>Optional permanent replacement mode that updates media items to WebP and deletes old JPEG\/PNG files after explicit confirmation.<\/li>\n<li>Quality control for WebP (default 82) and AVIF (default 60).<\/li>\n<li>Option to skip generated files when they are larger than the source file.<\/li>\n<li>No external API calls and no third-party tracking.<\/li>\n<\/ul>\n\n<p>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.<\/p>\n\n<h3>Developers<\/h3>\n\n<p>WP-CLI commands:<\/p>\n\n<ul>\n<li><code>wp attiawebp status<\/code> - Shows support details, pending counts, and background state.<\/li>\n<li><code>wp attiawebp convert [--limit=&lt;n&gt;] [--force]<\/code> - Creates WebP\/AVIF sidecars for pending attachments.<\/li>\n<li><code>wp attiawebp replace --confirm=DELETE-ORIGINALS [--limit=&lt;n&gt;]<\/code> - Runs the permanent replacement flow.<\/li>\n<li><code>wp attiawebp reset-markers [--which=sidecar|replace]<\/code> - Clears conversion or skip markers.<\/li>\n<\/ul>\n\n<p>Filters:<\/p>\n\n<ul>\n<li><code>aawo_conversion_quality( int $quality, string $source_path, string $target_mime )<\/code> - Adjusts quality per file or per target format.<\/li>\n<li><code>aawo_should_convert_file( bool $allowed, string $relative_path, string $absolute_path )<\/code> - Skips or allows specific files. The second argument is the path relative to uploads.<\/li>\n<li><code>aawo_delivery_rules( string $rules )<\/code> - Modifies the managed <code>.htaccess<\/code> rules block. The returned block must keep the BEGIN and END AttiaWebP markers.<\/li>\n<li><code>aawo_batch_time_budget( float $seconds )<\/code> - Changes the per-batch time budget for bulk processing.<\/li>\n<li><code>aawo_rating_notice_threshold( int $threshold )<\/code> - 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.<\/li>\n<\/ul>\n\n<h3>Privacy<\/h3>\n\n<p>AttiaWebP does not send images, site data, or usage data to external services. All conversion work happens locally on the WordPress server.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin folder to <code>\/wp-content\/plugins\/<\/code> or install the ZIP through Plugins &gt; Add New &gt; Upload Plugin.<\/li>\n<li>Activate the plugin through the Plugins screen in WordPress.<\/li>\n<li>Open Settings &gt; AttiaWebP WebP Optimizer.<\/li>\n<li>Review the settings and save your preferred configuration.<\/li>\n<li>Use the safe bulk conversion tool, the background mode, or the Media Library column to create WebP copies for existing media.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20this%20plugin%20delete%20my%20original%20images%20by%20default%3F\"><h3>Does this plugin delete my original images by default?<\/h3><\/dt>\n<dd><p>No. By default, the plugin creates WebP copies and leaves JPEG\/PNG originals untouched.<\/p><\/dd>\n<dt id=\"can%20it%20replace%20originals%20with%20webp%3F\"><h3>Can it replace originals with WebP?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"what%20is%20avif%20and%20should%20i%20enable%20it%3F\"><h3>What is AVIF and should I enable it?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"why%20is%20the%20avif%20option%20disabled%3F\"><h3>Why is the AVIF option disabled?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"what%20does%20quality%2082%20mean%3F\"><h3>What does quality 82 mean?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"does%20it%20use%20an%20external%20service%3F\"><h3>Does it use an external service?<\/h3><\/dt>\n<dd><p>No. Conversion uses the image editor available on the WordPress server, such as GD or Imagick.<\/p><\/dd>\n<dt id=\"will%20this%20work%20on%20every%20host%3F\"><h3>Will this work on every host?<\/h3><\/dt>\n<dd><p>The server must support WebP through GD or Imagick. The settings screen shows a basic support check for both WebP and AVIF.<\/p><\/dd>\n<dt id=\"what%20is%20background%20conversion%3F\"><h3>What is background conversion?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"does%20server%20delivery%20work%20on%20nginx%3F\"><h3>Does server delivery work on Nginx?<\/h3><\/dt>\n<dd><p>The built-in toggle manages an uploads <code>.htaccess<\/code> 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.<\/p><\/dd>\n<dt id=\"does%20server%20delivery%20change%20my%20woocommerce%20product%20html%3F\"><h3>Does server delivery change my WooCommerce product HTML?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"how%20do%20i%20exclude%20certain%20images%3F\"><h3>How do I exclude certain images?<\/h3><\/dt>\n<dd><p>Add patterns to the Exclusions box, one per line, matched against the path relative to the uploads folder. <code>*<\/code> works as a wildcard, for example <code>2024\/private\/*<\/code> or <code>*-logo.png<\/code>.<\/p><\/dd>\n<dt id=\"what%20happens%20if%20two%20images%20share%20a%20name%2C%20like%20photo.jpg%20and%20photo.png%3F\"><h3>What happens if two images share a name, like photo.jpg and photo.png?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"does%20uninstalling%20delete%20my%20webp%20and%20avif%20files%3F\"><h3>Does uninstalling delete my WebP and AVIF files?<\/h3><\/dt>\n<dd><p>No. Uninstalling removes the plugin options, attachment markers, background state, dismissal flags, and the managed uploads <code>.htaccess<\/code> block, but generated WebP\/AVIF image files are kept on disk for safety. Delete them manually if you no longer want them.<\/p><\/dd>\n<dt id=\"should%20i%20use%20permanent%20replacement%20on%20a%20live%20store%3F\"><h3>Should I use permanent replacement on a live store?<\/h3><\/dt>\n<dd><p>Only after testing on staging and creating backups. Some themes, builders, or stores may rely on generated image sizes.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.2.1<\/h4>\n\n<ul>\n<li>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.<\/li>\n<li>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.<\/li>\n<li>Added the aawo_rating_notice_threshold filter to raise, lower, or effectively disable the review notice.<\/li>\n<li>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.<\/li>\n<li>Fixed a double-unslash in the exclusion patterns sanitizer that could strip backslashes from saved patterns.<\/li>\n<li>Fixed duplicate admin notices after saving settings on the plugin screen.<\/li>\n<li>Fixed the Media Library WebP badge so items completed with skip-larger skips no longer look partially converted forever.<\/li>\n<li>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.<\/li>\n<li>Background runs now resume automatically if the scheduled cron event is lost, instead of blocking manual runs until stopped by hand.<\/li>\n<li>Re-activating the plugin now restores the uploads .htaccess delivery rules when server delivery is enabled in the saved settings.<\/li>\n<li>Hook callbacks on shared WordPress filters now tolerate unexpected values from other plugins instead of raising fatal type errors.<\/li>\n<li>The upload statistics scanner now skips unreadable folders and briefly caches partial results instead of rescanning on every page load.<\/li>\n<li>Corrected the developer filter signatures documented in this readme and documented the shared-name WebP collision and the uninstall file behavior.<\/li>\n<\/ul>\n\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>Added optional AVIF sidecar generation with its own quality setting and server support detection.<\/li>\n<li>Added a Media Library WebP column with status badges, per-image savings, a one-click Convert\/Regenerate button, and a bulk action.<\/li>\n<li>Added background conversion through WP-Cron with live progress, so large libraries convert without keeping the tab open.<\/li>\n<li>Added a progress bar, a Stop button, and per-batch counters to the interactive bulk tools.<\/li>\n<li>Added an estimated bandwidth savings card based on real sidecar files on disk.<\/li>\n<li>Added exclusion patterns to skip folders or file names during conversion.<\/li>\n<li>Added WP-CLI commands: status, convert, replace, and reset-markers.<\/li>\n<li>Added AVIF-aware server-delivery rules and a copy-paste Nginx configuration example for non-Apache servers.<\/li>\n<li>Added a capped on-screen log of recent conversion errors with a clear action.<\/li>\n<li>Added reset tools for conversion markers and previously skipped replacements.<\/li>\n<li>Batches now respect the PHP time limit and stop early instead of timing out on slow hosts.<\/li>\n<li>Added developer filters for quality, file exclusion, delivery rules, and batch time budget.<\/li>\n<li>Added an RTL admin stylesheet.<\/li>\n<\/ul>\n\n<h4>1.1.1<\/h4>\n\n<ul>\n<li>Hardened server-delivery rule management and avoided creating an empty uploads <code>.htaccess<\/code> file when delivery is disabled.<\/li>\n<li>Added admin notices when server-delivery rules cannot be written.<\/li>\n<li>Reworked bulk processing to use cursor-based batches instead of loading every attachment ID into memory.<\/li>\n<li>Added cached upload-file statistics with a manual refresh link.<\/li>\n<li>Disabled bulk buttons when WebP support is not available on the server.<\/li>\n<li>Refreshed the translation template and WordPress.org package metadata.<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Added optional server-level WebP delivery using managed uploads <code>.htaccess<\/code> rules.<\/li>\n<li>Kept front-end HTML rewriting disabled to avoid theme, WooCommerce, WPML, and cache-plugin conflicts.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Safe store build: disabled front-end URL rewriting and added real upload-file statistics.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial public release.<\/li>\n<\/ul>","raw_excerpt":"Local WebP\/AVIF sidecar conversion, savings statistics, media library tools, background processing, WP-CLI, and optional server-level delivery.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/bn-in.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/328639","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bn-in.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/bn-in.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/bn-in.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=328639"}],"author":[{"embeddable":true,"href":"https:\/\/bn-in.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/ahmedattia15"}],"wp:attachment":[{"href":"https:\/\/bn-in.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=328639"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/bn-in.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=328639"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/bn-in.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=328639"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/bn-in.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=328639"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/bn-in.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=328639"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/bn-in.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=328639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}