Unnecessary Unknown images are appear in WordPress

I got the unknown and unnecessary files on wordpress media and there is no option too to delete these files. How can i delete these files help me please !
enter image description here

Related posts

2 comments

  1. Your question is a bit vague kindly try to be as specific as you can. Well, You can delete those images from going to upload directory … its may be there is not title for your images … make sure those are proper images with proper image details like name, format etc

  2. Based on your image

    1.Tick the checkbox near File

    2.Select delete from the Above dropdown(bulk action)

    or

    you can delete from database:

    The Media Library lives in both wp_posts and wp_postmeta.

    wp_postmeta contains the image URL
    wp_posts contains an entry for each image insertion into a post, along with the post ID. you can get it by query

    Select * from wp_posts where post_type = 'attachment';
    

    Example for delete all media items(Note: Do only if you want to delete all media images)

    Locate your WordPress database in phpMyAdmin, then run this SQL command to delete ALL attachments:

    # First:
    
     DELETE FROM wp_postmeta WHERE post_id IN
     (
     SELECT id
     FROM wp_posts
     WHERE post_type = 'attachment'
     );
    
     # Second:
    
     DELETE FROM wp_posts WHERE post_type = 'attachment'
    

    for reference :click me

Comments are closed.