# Background image doesn't load

**URL:** https://discourse.processing.org/t/background-image-doesnt-load/46654
**Category:** Beginners
**Created:** [July 3, 2025, 10:43am UTC](https://discourse.processing.org/t/background-image-doesnt-load/46654 "2025-07-03T10:43:34Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [July 3, 2025, 12:11pm UTC](https://discourse.processing.org/t/background-image-doesnt-load/46654/2 "2025-07-03T12:11:19Z")

</div>

Hello @henk_lamers ,

Related post here:  
_[Processing Java Background Bug - #2 by glv](https://discourse.processing.org/t/processing-java-background-bug/46644/2)_

Try:

- Displaying image.
- What is _pixelDensity_? Try setting it to 1
- Use _println()_ to display size of image after loading

Report back.

Reference:

- [background() / Reference / Processing.org](https://processing.org/reference/background_.html)
- [pixelDensity() / Reference / Processing.org](https://processing.org/reference/pixelDensity_.html)
- [image() / Reference / Processing.org](https://processing.org/reference/image_.html)
- [println() / Reference / Processing.org](https://processing.org/reference/println_.html)

This works on my W10 PC and loads an image from Wikipedia:

```processing
PImage BackgroundGradient;

void setup () {
  size (1000, 1000);
  smooth();
  noStroke ();

  // Load the background image
  BackgroundGradient = loadImage ("https://upload.wikimedia.org/wikipedia/commons/0/08/1000X1000-01.jpg");
}

void draw() {
  background (BackgroundGradient);
}

```

`:)`

---

_[View the full topic](https://discourse.processing.org/t/background-image-doesnt-load/46654)._
