processing / processing/p5.js

Add `src` property to p5.Image objects

Open
#7,928 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area:Image Feature Request
Dominant language
JavaScript
Stars
24k
Forks
3.8k
Avg merge
3d 16h
Merged PRs (30d)
25

Description

Increasing access

Would make it easier to identify p5.Image objects in the console and could also be useful for p5 addons.

Most appropriate sub-area of p5.js?
  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)
Feature request details

When storing images in arrays it can be difficult for users to keep track of which p5.Image object corresponds to what image file.

This could be especially true in p5.js v2 if the user wants to load images in parallel using Promise.all.

Storing the image's url path on p5.Image objects in either a src property could alleviate this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the p5.Image entry point and the image-loading path, then review any related tests or API documentation. Confirm how images loaded individually and through Promise.all should expose the source URL, and use that behavior as the completion criterion.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.