Image optimizers work by using various techniques such as compression, resizing, and format conversion. Compression reduces the file size of the image by removing unnecessary data. Resizing adjusts the dimensions of the image, and format conversion changes the file type to a more efficient format like JPEG or PNG.