WP Manifestindependent plugin directory
manifest / admin / alt-fix-bulk

ALT Fix (Bulk) – SQL Robust

Bulk tool to automatically generate and fill missing image ALT attributes in WordPress using a robust SQL approach. It detects images with missing, NULL, empty or whitespace-only ALT text (or missing meta) and generates ALT values based on the attachment title, with optional fallback to the file name. The process runs safely in batches and can be triggered directly from the WordPress admin dashboard.

★ 0stars

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/fachu-dev/alt-fix-bulk/archive/refs/heads/main.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 powerful WordPress plugin that automatically detects and fixes missing image ALT attributes across your entire media library using a robust SQL approach. Perfect for improving SEO and web accessibility compliance.

Features

  • Robust SQL detection of images with missing, NULL, empty, or whitespace-only ALT text
  • Flexible ALT generation modes:
    • Attachment title only
    • Attachment title with fallback to filename (recommended)
    • Filename only
  • Advanced text normalization:
    • Replace dashes and underscores with spaces
    • Collapse multiple spaces into single spaces
    • Optional Title Case formatting
  • Configurable batch processing (50-1000 images per batch)
  • Real-time progress tracking with visual progress bar and statistics
  • Safe execution with transient locks preventing concurrent processing
  • Comprehensive logging with timestamped activity records
  • Clean admin interface with modern card-based design
  • Memory efficient batch processing for large media libraries

Installation

Method 1: Upload via WordPress Admin (Recommended)

  1. Download the latest release ZIP file from this repository
  2. In your WordPress admin, go to Plugins > Add New
  3. Click Upload Plugin
  4. Choose the downloaded ZIP file and click Install Now
  5. Click Activate Plugin

Method 2: Manual FTP Upload

  1. Download and extract the plugin files
  2. Upload the alt-fix-bulk folder to your /wp-content/plugins/ directory
  3. Activate the plugin through the Plugins menu in WordPress

Method 3: Git Clone (Development)

cd /path/to/wp-content/plugins/
git clone https://github.com/fachu-dev/alt-fix-bulk.git

Then activate through the WordPress admin.

Usage

  1. After activation, go to Tools > ALT Fix (Bulk) in your WordPress admin
  2. Review statistics: See how many images need ALT text
  3. Configure settings:
    • Choose ALT generation mode (title, title+filename fallback, or filename only)
    • Set batch size (300-500 for normal hosting, 800-1000 for powerful servers)
    • Enable text normalization options as needed
  4. Run processing:
    • Click "Procesar 1 lote" to process one batch and review results
    • Click "Procesar hasta terminar" to automatically process all batches
    • Use "Pausar" to stop processing at any time
  5. Monitor progress: Watch the real-time progress bar and review the activity log

Configuration Options

ALT Generation Modes

  • Título del adjunto (solo): Uses only the attachment title
  • Título → fallback a nombre de archivo: Uses attachment title, falls back to filename if title is empty (recommended)
  • Nombre de archivo (solo): Uses only the filename

Text Normalization

  • Normalize dashes: Replace - and _ with spaces
  • Collapse spaces: Convert multiple consecutive spaces to single spaces
  • Title Case: Apply Title Case formatting (optional)

Batch Size

  • 50-300: Conservative for shared hosting
  • 300-500: Recommended for most hosting environments
  • 500-1000: For powerful servers or VPS/dedicated hosting

Technical Details

SQL Approach

The plugin uses direct SQL queries to efficiently identify images with missing ALT attributes:

SELECT p.ID
FROM wp_posts p
LEFT JOIN wp_postmeta pm ON pm.post_id = p.ID AND pm.meta_key = '_wp_attachment_image_alt'
WHERE p.post_type = 'attachment'
  AND p.post_status = 'inherit'
  AND p.post_mime_type LIKE 'image/%'
  AND (pm.post_id IS NULL OR pm.meta_value IS NULL OR TRIM(pm.meta_value) = '')

Safety Features

  • Transient locks: Prevents multiple instances from running simultaneously
  • Batch processing: Avoids memory exhaustion on large libraries
  • Non-destructive: Only affects images with missing/empty ALT text
  • Progress preservation: Safe to stop and resume processing

Performance

  • Processes 300-1000 images per batch depending on server capacity
  • Direct SQL operations for maximum efficiency
  • Minimal memory footprint with batch-based processing
  • Real-time statistics and progress tracking

Use Cases

SEO Optimization

  • Improve search engine rankings with proper image ALT attributes
  • Ensure all images contribute to SEO value
  • Standardize ALT text formatting across the site

Accessibility Compliance

  • Meet WCAG accessibility guidelines
  • Prepare for accessibility audits
  • Improve screen reader compatibility

Site Maintenance

  • Clean up after content migrations
  • Fix bulk imports with missing ALT text
  • Standardize media library metadata

Requirements

  • WordPress: 5.0 or higher
  • PHP: 7.4 or higher
  • Memory: Standard WordPress memory limits (batch processing prevents issues)
  • Permissions: manage_options capability required

Support

For issues, feature requests, or contributions:

License

This project is licensed under the GPL v2 or later - see the LICENSE file for details.

Contributing

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

Changelog

1.0.0

  • Initial release
  • Robust SQL-based ALT attribute detection
  • Configurable batch processing system
  • Three ALT generation modes
  • Advanced text normalization options
  • Real-time progress tracking
  • Comprehensive logging system
  • Modern admin interface
  • Safety features and transient locks