add code from builtin widget_image example