Google can see several different elements of an image that it can use to help categorize it. This is useful primarily for image search purposes, but also for on-page SEO. Let’s go over them.
First up, you have technical details about the image. Google can tell when the file is static or if it’s an animated gif, and thus can file it away for that category search in image search results. You also have the file size, the file type, and the image dimensions. These are also used to categorize the image in image search.
Then you have the descriptive elements. Each of these is important, so I’ll cover each on its own.