Optimizing images with the alt tag (alt="")
When you see a picture of a baby crying, for example, you understand in an instant what is happening in it.
The problem is that this instant recognition is not possible for the search engine robots that crawl your site, because they cannot see what is in a picture. They read the code, so in the code you let them know what the picture shows. That is exactly what the alt attribute of an image is for.
What is the alt attribute of an image?
The shortest answer to this question is: it is text that helps search engines understand what is in the picture.
Below is a simple example of what an img tag should look like.
<img src="baby-crying.jpg" alt="Baby crying" />
There, it is that simple.
Image size in kilobytes (file size)
You probably know that website optimization is also affected by page loading time.
In most cases the images on a website account for more than 50% of its loading time. You will agree that this also makes them the most important thing to optimize.
To make your images load fast, make each image as small as possible (I am talking about kilobytes) without reducing its quality. How is that possible?
There are free tools on the internet such as Picnik or Image Optimizer at your service, so you have no excuse not to do it.
And one more very important thing.
Never let the browser physically shrink your images. If you have large images and use width and height tags to make them look smaller, the browser loads the whole image at its natural size and then shrinks it, so the whole process takes longer.
To solve this problem, always use a program that optimizes images, and only then put them on your web page.
An image on your web page should not exceed 150 kb (I am talking about the largest images, for example the ones in the background of the site).
Watch the name of the image
Before you put an image on a web page, choose a descriptive name for it. As in the previous example, the picture of a baby crying is called baby-crying.jpg.
This technique helps a great deal when images are searched for on the internet. You can try it yourself when you look for an image. In most cases the keywords you typed are in the name of that image.
The image caption
As far as I know, there is no direct relation between an image's caption and image optimization for search engines.
But the percentage of visitors who leave the site quickly (the bounce rate) rises if your images have no captions.
The bounce rate is the percentage of visits that ended after less than 10 seconds, out of all visits to the site. Search engines attach great importance to this percentage, because it is logical that if a user leaves a web page quickly, they did not find content that interests them.

And that is exactly where image captions play a big part.
After the page title, image captions are the most-read text on your pages. So I advise you to use them wisely :)
And finally...
If you spend a couple of hours writing an ideal article, do not forget to optimize the images to get the most out of search engines. Optimizing images will not take you more than a few minutes, and in most cases it is what "dots the i".