Skip to content

Scan WordPress media library for images missing image sizes #234

Description

@danielbachhuber

As a WordPress developer, it would be helpful to have a command I could run to determine which images (if any) were missing their expected image sizes.

Because WordPress doesn't create image size variations on the fly, introducing a new image size with add_image_size() later in the life of a WordPress install can mean earlier images don't have the necessary image size variation.

Activity

  1. eriktorsner commented on Aug 29, 2017

    @eriktorsner

    Also, looking for obsolete image sizes. Changing the default image size to new dimensions can potentially leave a lot of orphaned image file variations.

  2. quantegy commented on May 16, 2018

    @quantegy

    Would be nice to also be able to purge unused attachments and media

  3. transferred this issue fromwp-cli/ideason Mar 13, 2026
  4. swissspidy commented on Mar 13, 2026

    @swissspidy
    Member

    Not sure how useful such a list is without actually generating them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions