Is it possible for a virus to be embedded in a image and can this image execute on Android Oreo by just opening the image? I am aware that on Windows this is very much possible. But is it possible on Android (latest OS with all the security updates)? Can you install a virus/malware/spyware by just clicking on an image? Suppose the image is sent via WhatsApp/any other messenger?
Your comment about Windows is probably referring to WMF images, which aren't exactly 'normal' image files.  They can contain actual natively executable code, including being able to make some very low-level calls directly into the graphics drivers.  Most other image formats only contain actual image data (and usually some metadata about things like what color correction to do, what time the image was created, etc).

In theory, it's still possible to exploit normal image files though.  There have been a number of vulnerabilities over the years in various image handling libraries that could be used as starting points for actual ACE exploits (though the full exploit is likely to be platform specific).  These all just required an image to be processed by the library (so, displayed in an application that uses the vulnerable library).

However, it's a pretty unlikely attack vector for any realistic malware.  Coding an image that can exploit these issues and doesn't immediately arouse suspicion (either due to the size of the file, ro the lack of any content) is pretty hard, and given that these bugs tend to get patched very quickly, probably wouldn't be worth the effort long-term.