IT pill

Is there any tool equivalent to the option “Save for Web” present in IrfanView or Photoshop in Gimp for Linux?

Yes.
In Debian based distros you need to install the package gimp-plugin-registry and In CentOS the package is called gimp-save-for-web. Of course you need to install Gimp first.