This code snippet allows you to force a wibox.widget.imagebox
to be re-draw itself without pointing it to a new file path.
Important: the solution given here only works with PNG files. If your file is either not a PNG or you are not sure
about its type, you can convert it using ffmpeg
, shown at the end.