No WebP - Original Image Formats Extension
February 17, 2026 ยท View on GitHub
A Chrome Extension (Manifest V3) that prevents WebP and AVIF formats, ensuring images load and save in their original formats (GIF, PNG, JPG).

Features
๐ซ Network-Level WebP Blocking
- Uses Declarative Net Request to modify
Acceptheaders, removingimage/webpandimage/avif - Forces servers to fall back to original formats (GIF, PNG, JPG)
- Optional URL parameter rewriting to strip WebP-forcing parameters
๐ผ๏ธ DOM-Level Fallback
- Content script runs at
document_startto intercept image loading - Removes or demotes
<source type="image/webp">in<picture>elements - Selects non-WebP candidates from
srcsetattributes - Works with lazy loading via MutationObserver
๐พ Save Images in Original Format
- Right-click context menu: "Save image as original format"
- Re-fetches images with modified headers to get original format
- Automatically detects correct file extension from Content-Type
- Handles
<picture>,srcset, and regular images
โ๏ธ Configurable Settings
- Enable/disable WebP blocking globally
- Manage per-site allowlist for sites that require WebP
- Toggle URL parameter rewriting
- Beautiful, modern options page
Installation
Load Extension in Chrome
-
Open Chrome and navigate to
chrome://extensions/ -
Enable "Developer mode" (toggle in top-right corner)
-
Click "Load unpacked"
-
Select the extension directory (folder containing
manifest.json) -
Verify Installation:
- The extension should appear in your extensions list
- Click "Options" to configure settings if needed
For detailed installation instructions, see INSTALLATION_GUIDE.md.
Usage
Basic Usage
Once installed, the extension automatically:
- Blocks WebP/AVIF requests at the network level
- Modifies DOM to prefer original formats
- Allows right-click saving of images in original format
Configuration
Click the extension icon or go to Options to:
-
Enable/Disable WebP Blocking
- Toggle the main functionality on/off
- Useful for troubleshooting or temporary disable
-
URL Rewriting
- Removes query parameters that force WebP (e.g.,
fm=webp,format=webp) - Toggle on/off based on your needs
- Removes query parameters that force WebP (e.g.,
-
Site Allowlist
- Default allowlist: Reddit (reddit.com and related domains) is pre-configured since it only serves WebP
- Add additional domains where WebP should NOT be blocked
- Useful for sites that only serve images in WebP format
- Example:
example.com,cdn.example.com - You can remove default sites if needed (though they may not function properly)
Saving Images
Method 1: Context Menu
- Right-click any image
- Select "Save image as original format"
- Image is re-fetched with original format headers
- Downloads with correct file extension
Method 2: Regular Save
- Since WebP is blocked at network level, regular "Save image as..." should also work
Testing
Test the extension on these sites known to serve WebP:
- Google Images: https://images.google.com (should show original formats)
- Reddit: https://www.reddit.com (on allowlist by default, will show WebP)
- Twitter: https://twitter.com (should show original formats)
- Imgur: https://imgur.com (should show original formats)
- Wikipedia: https://www.wikipedia.org (should show original formats)
Note: Reddit is on the default allowlist because it only serves WebP. To test WebP blocking on Reddit, you would need to remove it from the allowlist (though images may not load).
Verification Steps
-
Check Network Tab:
- Open DevTools (F12) โ Network tab
- Filter by "Img"
- Load a page with images
- Verify images are loading as GIF/PNG/JPG instead of WebP
-
Check Accept Header:
- In Network tab, click an image request
- Check Headers โ Request Headers
- Verify Accept header does NOT include
image/webporimage/avif
-
Test GIF Animation:
- Find an animated GIF
- Verify it displays correctly (not as static WebP)
- Right-click โ "Save image as original format"
- Verify saved file is
.gifand animates
-
Check Console:
- Look for extension logs
- No errors should appear
Project Structure
chrome-nowebp/
โโโ manifest.json # Extension manifest (MV3)
โโโ background.js # Service worker (DNR, context menu)
โโโ content.js # Content script (DOM manipulation)
โโโ options.html # Options page UI
โโโ options.js # Options page logic
โโโ icons/ # Extension icons
โ โโโ icon16.png # 16x16 toolbar icon
โ โโโ icon48.png # 48x48 management icon
โ โโโ icon128.png # 128x128 store icon
โ โโโ icon.svg # SVG source
โโโ README.md # This file
โโโ INSTALLATION_GUIDE.md # Installation instructions
Technical Details
Manifest V3 Features
- declarativeNetRequest: Modify headers and URLs at network level
- Service Worker: Background script with persistence
- Content Scripts: Run at
document_startfor early interception - Chrome Storage API: Sync settings across devices
DNR Rules
The extension creates dynamic rules to:
- Modify Accept header: Remove WebP/AVIF mime types from image requests
- Redirect URLs: Strip WebP-forcing parameters (optional)
Content Script Strategy
- Initial Processing: Process existing images on page load
- MutationObserver: Watch for dynamically added images
- Picture Elements: Remove WebP/AVIF sources
- Srcset Handling: Select best non-WebP candidate based on DPR
Context Menu Implementation
- User right-clicks image
- Extension fetches image URL with modified Accept header
- Inspects Content-Type to determine format
- Downloads with correct file extension
Troubleshooting
Images Still Loading as WebP
- Check if extension is enabled (Options page)
- Check if site is on the allowlist - Reddit and related domains are on the default allowlist
- Check browser console for errors
- Some CDNs may only serve WebP with no fallback - add these sites to allowlist if they break
Save Not Working
- Ensure Downloads permission is granted
- Check popup blocker settings
- Some sites may block cross-origin fetches
Performance Issues
- Disable URL rewriting if causing problems
- Add problematic sites to allowlist
- Check console for excessive logs
Known Limitations
- CDN Limitations: Some CDNs only serve WebP - no fallback available
- Cross-Origin Restrictions: Some images can't be re-fetched due to CORS
- Srcset Complexity: Complex srcset with mixed formats may not always select optimally
- Background Images: CSS background images are not currently handled
Contributing
Feel free to submit issues, fork the repository, and create pull requests for any improvements.
License
This project is provided as-is for educational and practical use.
Changelog
Version 1.0.0 (Initial Release)
- Network-level WebP/AVIF blocking via DNR
- DOM fallback for picture and srcset elements
- Context menu for saving images in original format
- Options page with allowlist management
- URL parameter rewriting (optional)
- Default allowlist for WebP-only sites (Reddit and related domains)