Front-end developers optimize websites by minimizing code, optimizing images, and utilizing techniques like lazy loading to improve loading times and overall performance.