At the moment I am writing a utility that, among other things, should upload images from the site to the hard disk. I use ImageIO.read (URL input) for working with images, however with some URLs the method refuses to read the image returning null. Example: Image image = ImageIO.read(new URL("http://upload.wikimedia.org/wikipedia/commons/thumb/9/91/Wikiversity-logo.svg/28px-Wikiversity-logo.svg.png")); will return null, though, if you type a link into the browser, everything opens wonderfully.

    1 answer 1

    Http is used in your url, but you should go over https

     ImageIO.read(new URL("https://upload.wikimedia.org/wikipedia/commons/thumb/9/91/Wikiversity-logo.svg/28px-Wikiversity-logo.svg.png"));