# Push button image

**URL:** <https://discourse.processing.org/t/push-button-image/7880>\
**Category:** Libraries\
**Created:** [January 27, 2019, 4:09pm UTC](https://discourse.processing.org/t/push-button-image/7880 "2019-01-27T16:09:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [January 29, 2019, 6:38pm UTC](https://discourse.processing.org/t/push-button-image/7880/2 "2019-01-29T18:38:24Z")

</div>

I think you might want to add an image to a button?

Here is the example from the ControlP5 library:

[http://www.sojamo.de/libraries/controlP5/examples/extra/ControlP5imageButton/ControlP5imageButton.pde](http://www.sojamo.de/libraries/controlP5/examples/extra/ControlP5imageButton/ControlP5imageButton.pde)

…and past related discussions of cp5 images and control elements:

> **[Processing 2.x and 3.x Forum](https://forum.processing.org/two/discussion/27795/controlp5-changing-image-button-to-the-clicked-image-without-actually-clicking-it)**
>
> Processing is an electronic sketchbook, a language and a worldwide community. This is its forum.

> [@Cp5 Knob: how to use an image?](https://discourse.processing.org/t/cp5-knob-how-to-use-an-image/1143):
>
> hey everybody, I have a problem i can’t seem to solve: I want to use an image instead of the standard Knob-layout. It works fine with buttons, toggles, … but not with knobs? Anyone got any idea what I’m doing wrong? Here’s (part of) my code: import controlP5.\*; ControlP5 cp5; PImage turnKnob; void setup() { size(860, 582); cp5 = new ControlP5(this); PImage[] turnKnob = {loadImage("turnKnob\_small.png"),loadImage("turnKnob\_small.png"),loadImage("turnKnob\_small.png")}; cp5.ad…

---

_[View the full topic](https://discourse.processing.org/t/push-button-image/7880)._
