# Background from a picture

**URL:** <https://discourse.nodered.org/t/background-from-a-picture/48184>\
**Category:** General\
**Created:** [8 July 2021 18:35 UTC](https://discourse.nodered.org/t/background-from-a-picture/48184 "2021-07-08T18:35:37Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![madmax](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@madmax](https://discourse.nodered.org/u/madmax)\
**Post date:** [8 July 2021 21:42 UTC](https://discourse.nodered.org/t/background-from-a-picture/48184/14 "2021-07-08T21:42:43Z")

</div>

> [@HTTP endpoint for image payloads](https://discourse.nodered.org/t/http-endpoint-for-image-payloads/42598/4):
>
> Hi, firstly, as you are not using dashboard (you are pretty much building a website from endpoints) you have to include html/head/body tags)
> 
> Ok, so since this is all client side, you need to post the data back to your 2nd endpoint. for this I simply used `fetch` . Also, as that P5 library generates its results on a canvas, you need to call `.toDataURL()` on the canvas to get the base64 data.
> 
> If you want to save this as an actual image, you should convert the base64 to binary. NOTE: Image tools has a `write` function to take the worry out of the format etc.
> 
> anyhow, here you go...

Hello!

Many thanks for the answer.

But unfortunately it doesn't happen when you click on inject

---

_[View the full topic](https://discourse.nodered.org/t/background-from-a-picture/48184)._
