text: Silver iodide is prepared by reaction of an iodide solution ( e.g. potassium iodide ) with a solution of silver ions ( e.g. , silver nitrate ) .
simplified: It is made by reacting an iodide such as sodium iodide with silver nitrate .