add an example with a custom loader to display a spinner while the image is loading