Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loadImage function delay #3232

Open
smv307 opened this issue Sep 13, 2024 · 3 comments
Open

loadImage function delay #3232

smv307 opened this issue Sep 13, 2024 · 3 comments
Labels

Comments

@smv307
Copy link

smv307 commented Sep 13, 2024

p5.js version

v1.10.0

What is your operating system?

Mac OS

Web browser and version

128.0.6613.137

Actual Behavior

The loadImage function is unable to fetch medium and large images immediately after uploading them to the project's files, with delays of several hours. Smaller images load successfully right away.

Screenshot 2024-09-12 at 11 30 59 AM

Expected Behavior

Ideally, the loadImage function would work for any image immediately after it is uploaded to the web editor, regardless of size.

Steps to reproduce

Snippet:

let photo;

function preload(){
  photo = loadImage("photo.jpg");
}

function setup() {
  createCanvas(400, 400);
  image(photo,0,0);
}

function draw() {
}
@smv307 smv307 added the Bug label Sep 13, 2024
Copy link

welcome bot commented Sep 13, 2024

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.

@smv307 smv307 changed the title loadImage function loadImage function delay Sep 13, 2024
@raclim
Copy link
Collaborator

raclim commented Sep 13, 2024

Thank you so much for reporting this @smv307!

This might be loosely related to a few other issues related to the loadImage() function as well (i.e #3069). I've been having some difficulty pinpointing how to resolve this—I didn't realize that it could also be due to the file sizes! Would you be able to provide URLs to some of your sketches with this issue?

@smv307
Copy link
Author

smv307 commented Sep 16, 2024

Hi! Here is the sketch I used to demonstrate the issue:

https://editor.p5js.org/smv307/sketches/_MydTJWtN

The larger image I attempted to use still won't load after a few days, but the smaller WEBP version works. I've noticed that WEBP images, in general, aren't affected by this issue.

In all my previous experiences with this bug, it typically resolves itself within a few hours, so I don't have any other examples 🥲.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants