Added thumbnail variants to prepareRemove function

This fixes an issue where thumbnail images would not be deleted.