Optimization of photos for successful marketing

How to optimize images for a website.