Image optimization strategy

Tools and utilities for image optimisation

  1. Regenerate Thumbnails in bulk in WordPress
    1. WPCLI media command wp media regenerate --noprompt (best choice for command line)
    2. Force Regenerate Thumbnails plugin (most reliable, also to delete unused thumbnail sizes)
    3. AJAX Thumbnail Rebuild plugin (preferable UI, not totally reliable)
    4. Regenerate Thumbnails plugin
  2. Resize images in Î…WordPress Media Library

    1. Imsanity plugin to prevent large images being uploaded
      • Imsanity WPCLI wp imsanity resize to mass resize existing images
    2. GraphicsMagick command line tool
  3. Delete unused images in WordPress

    1. Media cleaner plugin to delete old unattached/unused images
      • seems to be missing images at times
    2. Bulk delete plugin to massively delete old posts
      • Delete posts, then delete unattached images or delete images by date
  4. Compress existing images in WordPress

    1. Our crunch.php utility to unconditionally compress and resize all images, originals and thumbnails (best results, not always good with PNGs, use with caution because it does massive changes to files)
    2. TinyPNG plugin for all images
      • Best compression ever, small free plan, best for new sites with few images.
    3. Jpegoptim and Optipng command line utilities.
  5. PNG to JPG conversion in in WordPress to transform PNGs to JPGs
    • breaks some images occasionally