Delete Unused images

Rating

tags

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.

Screen001734.png

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.

Screen001731.png

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.
Screen001732.png

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


Screen001733.png