@Nullable
    @Override
    public ImageFormat determineFormat(byte[] headerBytes, int headerSize) {
      if (headerSize < getHeaderSize()) {
        return null;
      }
      if (ImageFormatCheckerUtils.startsWithPattern(headerBytes, HEADER)) {
        return SVG_FORMAT;
      }
      for (byte[] possibleHeaderTag : POSSIBLE_HEADER_TAGS) {
        if (ImageFormatCheckerUtils.startsWithPattern(headerBytes, possibleHeaderTag)
            && ImageFormatCheckerUtils.indexOfPattern(
                    headerBytes, headerBytes.length, HEADER, HEADER.length)
                > -1) {
          return SVG_FORMAT;
        }
      }
      return null;
    }
SVG example that defines all classes required to decode and render SVG images.
samples/showcase/src/main/java/com/facebook/fresco/samples/showcase/imageformat/svg/SvgDecoderExample.java