Skip to content

regenerate command runs on non-image files #25

@mrwweb

Description

@mrwweb

When running this:

$ wp media regenerate --yes

The command runs on ALL attachments, regardless of file type.

This results in lots of awkward errors when run on audio, video, PDFs, etc. Here's an example:

...
Warning: 23/23 Couldn't regenerate thumbnails for "2012 Guest gallery proposal guidelines" (ID 20).
Error: Only regenerated 16 of 23 images.

In the above example, the media library contains 16 images and 7 non-image files.

It would seem wp regenerate media is naturally intended only for images and so it would make sense to only run it on a whitelist of filetypes. This would also avoid issues like this one.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions