Can I upload an image to the web?

Ok this isn’t a question about the code itself. In processing examples there’s one where they download an image from the internet and display it. My question is “is there a website that I can upload an image and use it’s link in my code?”

1 Like

You mean uploading by code? Or just upload it to a cloud like for instance Drive, where you can share the link and use it to download?

Not uploading by code. A website that I can manually upload pictures and use the picture link in my code. Upload manually and manually get a link that I can use in my code. Google drive doesn’t seem to work.

Of cours it works. After uploading your file you search for the uploaded file and click on the three dots where you can choose “share”. The link will be copied to your clipboard.

Sorry it took so long but here’s the code… the picture is a game character and to save space i wanted to load from the internet… the code returns an error “could not find a method to load ‘link’” any idea on a good website? Google drive crashes.

 * Loading Images. 
 * Processing applications can load images from the network. 

PImage img;

void setup() {
  size(640, 360);
  img = loadImage("");

void draw() {
  if (img != null) {
    for (int i = 0; i < 5; i++) {
      image(img, 0, img.height * i);


I think you need a direct link to your image like "https://url_to_your_img.png".
I don’t know if it’s possible with Google Drive but you can use other image hosting websites like Imgur, Flickr, tinyPic or DropBox…


I have tried it with DropBox also.
Both of them use java script for transfer.
Even if you try to download a text with loadStrings() it will give you an output. But it’s java script.
If you download a “clean file” it will work.

String[] lines = loadStrings(""); 
  println("there are " + lines.length + " lines"); 
  for (int i = 0; i < lines.length; i++) { 

So I think you have to have it stored on own domain.

We never give up!!
I found a way.
Simply open the link in a browser, then click on image and choose “open image in new guide”. Then copy that link and it will work.

Edit: sigh, not for drive only for regular web site.

I managed it with an image that I stored on Pinterest with the method I described previously.

PImage img; 

void setup() { 
  size(250, 200); 
  img = loadImage(""); 
  image(img, 0, 0);

Yay pininterest works! THANK you so much! I can save so much more space with this!

Hi, mikeren, welcome to the community.