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;
});
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
Desired Behavior
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
/**
*/
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;
});