public String changeImageBase64(String imgUrl){
URL url = null;
BufferedImage image = null;
try{
url = new URL(imgUrl);
image = ImageIO.read(url);
String[] imgType = ImageIO.getReaderMIMETypes();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ImageIO.write(image, "png", baos);
byte[] bytes = baos.toByteArray();
return Base64.encodeBase64(bytes)
}catch (Exception e) {
e.printStackTrace();
}
}