Heavy metal ions and particulate pollutants can be effectively removed by a gravity-driven ceramic foam filter optimized by carbon nanotube implantation.