How do I prevent chafing when wearing swim trunks?

Responsive image
source