Delete Unused images



Someone asked me how to delete images in Drupal 8. He had removed the image with FTP but they still were visible in the 'files' view. Logically ... physically deleting a file will not change the database.

I do it this way ... We use the files view.


You have to install Views Bulk Operations and add a VBO field to view the files. There you have the option to delete the selected entities.


You can now simply click the files. Note that the summary will automatically show the file usage. So you see when you take a picture that is no longer used.

There follows a confirmation and ... the file on the server and in your Drupal database will be deleted.