private void makeImgToBase64(HtmlPage page) throws FailingHttpStatusCodeException, MalformedURLException, IOException {
		@SuppressWarnings("unchecked")
		List<HtmlImage> imageList = (List<HtmlImage>) page.getByXPath("//img");
		
		for (HtmlImage image : imageList) {
	    	InputStream ins = webClient.getPage("http://ecampus.ucn.dk" + image.getSrcAttribute()).getWebResponse().getContentAsStream();
	    	
	    	byte[] imageBytes = new byte[0];
    	    for(byte[] ba = new byte[ins.available()]; ins.read(ba) != -1;) {
    	        byte[] baTmp = new byte[imageBytes.length + ba.length];
    	        System.arraycopy(imageBytes, 0, baTmp, 0, imageBytes.length);
    	        System.arraycopy(ba, 0, baTmp, imageBytes.length, ba.length);
    	        imageBytes = baTmp;
    	    }
    	    image.setAttribute("src", "data:image/gif;base64," + DatatypeConverter.printBase64Binary(imageBytes));
	    }
	}