type() {
    var type
      , buf = Buffer.alloc(4);

    fs.readSync(this.fd, buf, 0, 4, 0);

    // GIF
    if (0x47 == buf[0] && 0x49 == buf[1] && 0x46 == buf[2]) type = 'gif';

    // PNG
    else if (0x50 == buf[1] && 0x4E == buf[2] && 0x47 == buf[3]) type = 'png';

    // JPEG
    else if (0xff == buf[0] && 0xd8 == buf[1]) type = 'jpeg';

    // SVG
    else if ('svg' == this.extname) type = this.extname;

    return type;
  }
Return the type of image, supports:

 - gif
 - png
 - jpeg
 - svg

@return {String}
@api private