public static void loadImage(String url, String galleryName) {
        try {
            String src = prefixSrc;
            src += galleryName;
            src += "\\";
            String imgName = getFileName(url);
            src += getFileName(url);
            addImgToXmlData(imgName, galleryName);
            BufferedImage img = ImageIO.read(new URL(url));
            File file = new File(src);
            if (!file.exists()) {
                file.createNewFile();
            }
            ImageIO.write(img, "jpg", file);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }