API change picture in real time

I am trying to change picture on the display using API in the real time.

First I need to upload picture to library via API, this works fine.

Then to get playlist ID and widget ID, this is also without problems.

But how to replace the original picture in the layout by new uploaded picture?

I saw similar topic here in forum but for the text change, unfortunately it doesn’t help me with the picture change.