The sitemap of my website is currently indexing only posts and pages. It is not indexing the media content that is images and attachments. Is it a good idea not to submit images for indexing. If not what are the possible drawbacks?
There is an additional type of sitemap called an image sitemap. It's similar to regular XML sitemaps but uses a slightly different format. See Google's help page for details.
You can create a separate file or add the
<image:image> element to your existing sitemap.
I would say that if you are able to create this without too much effort - for example integrate it into an existing automatic sitemap generation - then go for it. If you need to add a lot of images manually then it may not be worth your time.