# Show externally tracked images/video in app ui

**URL:** <https://community.wandb.ai/t/show-externally-tracked-images-video-in-app-ui/6782>\
**Category:** W&B Help\
**Created:** [May 26, 2024, 4:59am UTC](https://community.wandb.ai/t/show-externally-tracked-images-video-in-app-ui/6782 "2024-05-26T04:59:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![liamjwang](https://avatars.discourse-cdn.com/v4/letter/l/edb3f5/32.png) [@liamjwang](https://community.wandb.ai/u/liamjwang)\
**Post date:** [May 26, 2024, 4:59am UTC](https://community.wandb.ai/t/show-externally-tracked-images-video-in-app-ui/6782/1 "2024-05-26T04:59:19Z")

</div>

Hi, I was wondering if it’s possible to show an externally tracked image file (from https, s3, gcs, etc.) in the app web UI.  
Ideally, it would show up as a image panel in the panel bank, just like when logging a regular wandb.Image.  
The doc page on tracking external artifacts (link below) says something about rendering external images/audio/video in the app UI, which makes it sound like it should be possible.

> **[Track external files | Weights & Biases Documentation](https://docs.wandb.ai/guides/artifacts/track-external-files#:~:text=Rich%20media%20such%20as%20images%2C%20audio%2C%20video%2C%20and%20point%20clouds)**
>
> Track files saved outside the W&B such as in an Amazon S3 bucket, GCS bucket, HTTP file server, or even an NFS share.

Thank you!

---

<div class="post-metadata">

**Author:** ![joana-marie](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@joana-marie](https://community.wandb.ai/u/joana-marie)\
**Post date:** [May 30, 2024, 8:50am UTC](https://community.wandb.ai/t/show-externally-tracked-images-video-in-app-ui/6782/2 "2024-05-30T08:50:29Z")

</div>

Hi @liamjwang , can you tell us more about your experiment or specific use case so we could understand better the inquiry. Thanks~

---

<div class="post-metadata">

**Author:** ![liamjwang](https://avatars.discourse-cdn.com/v4/letter/l/edb3f5/32.png) [@liamjwang](https://community.wandb.ai/u/liamjwang)\
**Post date:** [May 30, 2024, 5:46pm UTC](https://community.wandb.ai/t/show-externally-tracked-images-video-in-app-ui/6782/3 "2024-05-30T17:46:51Z")

</div>

Hi @joana-marie, thanks for the reply. I have a model that logs an image on every step to an AWS bucket with public read-only access. If possible, I would like to view these images in the wandb UI without uploading the images to my wandb storage.

If I log an image the usual way with a wandb.Image(), it would be uploaded to the wandb storage instead of showing the image from the AWS bucket url.

There is a section in the documentation about tracking external files. I understand how to log external _artifacts_, but (image) artifacts aren’t rendered in the App UI.

This quote from the “track external files” documentation seems to suggest that rich media like images/audio/video can be rendered in the App UI somehow if the bucket is properly configured:

> Rich media such as images, audio, video, and point clouds may fail to render in the App UI depending on the CORS configuration of your bucket. Allow listing **[app.wandb.ai](http://app.wandb.ai)** in your bucket’s CORS settings will allow the App UI to properly render such rich media.

I can allow **[app.wandb.ai](http://app.wandb.ai)** in the CORS settings of my bucket, but even still I don’t think the wandb app UI will attempt to render an image _artifact_.  
So, I’m wondering if there’s example code that shows how to “render rich media in the App UI from an external bucket” like this documentation describes.

Thank you!

---

<div class="post-metadata">

**Author:** ![joana-marie](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@joana-marie](https://community.wandb.ai/u/joana-marie)\
**Post date:** [June 6, 2024, 5:38am UTC](https://community.wandb.ai/t/show-externally-tracked-images-video-in-app-ui/6782/4 "2024-06-06T05:38:55Z")

</div>

Hello @liamjwang

Thank you for clarifying, could you please try the following code:

```auto
import os
import wandb
import numpy as np
from PIL import Image as PILImage

run = wandb.init(project="project-name")
image_paths = ["URL_1","UR;_2"]

# Log images
for i, img_path in enumerate(image_paths):
    # Read the image file
    image = PILImage.open(img_path)
    
    # Convert the image to a numpy array if needed
    image_array = np.array(image)
    
    # Log the image to wandb
    wandb.log({f"image_{i}": [wandb.Image(image_array, caption=f"Image {i}")]})

wandb.finish()

```

---

<div class="post-metadata">

**Author:** ![joana-marie](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@joana-marie](https://community.wandb.ai/u/joana-marie)\
**Post date:** [June 13, 2024, 2:35am UTC](https://community.wandb.ai/t/show-externally-tracked-images-video-in-app-ui/6782/5 "2024-06-13T02:35:23Z")

</div>

Hi @liamjwang , since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!
