So I’d like to find out what images from the Media library are not attached to anything so I can delete them, although I googled I did not found anything or my request wasn’t accurate enough, I am not sure. Do you know any of ways to how to detect that? I also want to try to write an SQL statement, however I am not sure if I should look for relationships in postmeta table, because technically the image uploaded trough a media library as I know is considered as a post, so maybe I can find a way somehow. Although I haven’t tried anything like that yet.
Any help is really appreciated