code: protected Reader generateResourceForDebug(Reader rd, GeneratorContext context) {
  
  		// Rewrite the image URL
  		StringWriter writer = new StringWriter();
  		try {
  			IOUtils.copy(rd, writer);
  			String content = rewriteUrl(context, writer.toString());
  			rd = new StringReader(content);
  		} catch (IOException e) {
  			throw new BundlingProcessException(e);
  		}
  
  		return rd;
  	}
docs: Returns the resource in debug mode. Here an extra step is used to rewrite
  the URL in debug mode
  
  @param reader
  the reader
  @param context
  the generator context
  @return the reader