A robust metalloporphyrin-based conjugated microporous polymer has shown a high efficiency for iodine capture and reversible character.