How to extract the boundary of a raster image?

You can use Plugin: Image Footprint as commented by @Mapperz. You need to download the plugin from plugin Manager, and this is how it works:

enter image description here

  1. Specify the folder (directory) where the images are located
  2. Use Valid pixels and specify the CRS of the image.
  3. The outpout will create a virtual vector file with a CRS of WGS84 as the default CRS
  4. You need to Save as the virtual vector file into a permanent file with the correct CRS that should be same as the image file.

Here is the input image file stored in the folder:

enter image description here

Here is the output footprint:

enter image description here

You can refer to the presentation: Qgis ibama imagefootprint for more information.