Sending Pics illegal?

I have been told sending nude pictures to your bf, or just to anyone actually, while under 18 years of age is illegal. I am unaware of any laws for this and was hoping some would have more insight on this topic than myself. (I am aware is it illegal to show someone elses pictures to another. For this i am asking specifically if just sending them is wrong) Any responses will be helpful, please be kind and positive, Thank you!