Imodium contains the active ingredient Loperamide which is an opioid drug or a narcotic. Data are unclear whether this drug will shop up on a drug test. Loperamide is mainly excreted via feces and only about 2% are excreted in the urine. The dose may also be a factor for detection. Just make sure you have your doctor's prescription to show to the drug testing officials that you are taking Imodium.