WP Manifestindependent plugin directory
manifest / media / bulk-image-scanner

Bulk Image Scanner

Scan all post content for image URLs and replace them individually or in bulk. Import images to the Media Library and update post content URLs.

★ 1stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/braudypedrosa/bulk-image-scanner/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A WordPress plugin to scan all post content for image URLs and replace them individually or in bulk. Import images to the Media Library and update post content URLs.

Features

  • Batch Scanning: Scan all posts and pages for external image URLs
  • Live Progress: Real-time progress bar during scanning and importing
  • Individual Import: Import single images to Media Library with one click
  • Bulk Import: Import all found images at once
  • Smart Detection: Automatically skips images already in Media Library
  • URL Pattern Filtering: Filter images by URL pattern (e.g., https://example.com/uploads/)
  • 404 Detection: Option to exclude images that return 404 errors
  • Post Type Support: Choose which post types to scan
  • File Type Filtering: Configure allowed image extensions
  • Modern UI: Clean, responsive interface with SweetAlert2 notifications

Installation

From Source (Development)

  1. Clone or download this repository
  2. Install dependencies:
    npm install
  3. Build the plugin:
    npm run build
  4. The plugin zip file will be created in bundled/1.0.0/bulk-image-scanner.zip
  5. Upload the zip file to your WordPress site via Plugins > Add New > Upload Plugin

Manual Installation

  1. Upload the plugin files to /wp-content/plugins/bulk-image-scanner/
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Navigate to 'Bulk Image Scanner' in the admin menu

Usage

  1. Scan for Images: Enter a URL pattern (optional) and click "Scan"
  2. Review Results: View all found images in a sortable table
  3. Import Images:
    • Click "Import to Media Library" for individual images
    • Click "Import All" to import all images at once
  4. Monitor Progress: Watch the progress bar and status messages
  5. Configure Settings: Adjust allowed extensions and post types in the Settings tab

Configuration

Allowed Image Extensions

Default: jpg,jpeg,png,webp

Post Types to Scan

Default: Posts and Pages

URL Pattern Filtering

Examples:

  • https://example.com/uploads/ - Only images from this domain/path
  • https://cdn.example.com/ - Only images from CDN
  • Leave empty to scan all image URLs

Development

Building the Plugin

# Install dependencies
npm install

# Build the plugin
npm run build

# Clean build directory
npm run clean

File Structure

bulk-image-scanner/
├── assets/
│   ├── bulk-image-scanner.css
│   └── bulk-image-scanner.js
├── includes/
│   ├── class-bis-actions.php
│   ├── class-bis-admin.php
│   ├── class-bis-scan-table.php
│   ├── class-bis-scan.php
│   └── class-bis-settings.php
├── bulk-image-scanner.php
├── build.js
├── package.json
└── README.md

Key Features Explained

Smart Media Library Detection

The plugin checks if an image is already in the Media Library before attempting to import it, preventing duplicate imports and saving time.

Batch Processing

Uses AJAX batch processing to handle large numbers of posts efficiently without timeouts.

Error Handling

Comprehensive error handling for network issues, file type validation, and WordPress integration.

Requirements

  • WordPress 5.0 or higher
  • PHP 7.4 or higher
  • JavaScript enabled in browser
  • Admin privileges

Changelog

Version 1.0.0

  • Initial release
  • Batch scanning functionality
  • Individual and bulk import
  • Smart Media Library detection
  • Modern UI with SweetAlert2
  • Configurable settings

License

This plugin is licensed under the GPL v2 or later.

Support

For support, please create an issue on the GitHub repository or contact the developer.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

Credits

  • SweetAlert2: Beautiful, responsive, customizable replacement for JavaScript's popup boxes
  • DataTables: Advanced interaction controls for HTML tables
  • WordPress: The world's most popular CMS