Skip to content

Feature Request: Allow MP4 videos to appear in the “Set Featured Image” modal (for assigning video URLs to featured images) #24

@rickpbaker

Description

@rickpbaker

When setting a Featured Image in WordPress, the media modal is restricted to post_mime_type=image/*. This prevents editors from uploading or viewing MP4 files in that modal — even though WP-Easy supports image attachments that include a video URL meta field (e.g., to play a video via wp-image).

This makes it cumbersome to assign a video to a thumbnail, since the editor can’t see or select the uploaded MP4 while setting the featured image.

Current Behavior

  • The “Set Featured Image” modal filters to images only (mime_type=image/*).
  • If a user uploads an MP4 during that step, it successfully uploads but disappears immediately from view.
  • Editors must exit the modal, go to Media → Library, copy the MP4 URL manually, and paste it into the image’s “Video URL” meta field.

Desired Behavior

  • Add a dropdown filter (e.g., “Videos (MP4)”) to let editors filter to just videos.
  • Display both images and MP4s in the media grid (so users can easily copy video URLs).
  • Preserve the normal image-only behavior for everything else.

Here's some code that allows MP4's to show in the grid, but this doesn't add anything to the Drop Down filter which is expected UI/UX
/**

  • Allow MP4 videos to appear in the Featured Image modal alongside images.
    */
    add_filter('ajax_query_attachments_args', function ($query) {
    // If the modal is filtering to images only, extend it to include MP4s.
    if (isset($query['post_mime_type']) && $query['post_mime_type'] === 'image') {
    $query['post_mime_type'] = ['image', 'video/mp4'];
    }
    return $query;
    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions