Trying to add a custom image to Opensearch but cannot find "ui/assets" folder?

500 Views Asked by At

I am trying to add a custom image to OpenSearch dashboards. I want to use locally hosted images and save them in the assets folder.

According to Opensearch: https://opensearch.org/docs/latest/dashboards/branding/

if you really want to use locally hosted images, save your images inside assets, and then configure opensearch_dashboards.yml to use the correct paths. You can access locally stored images through the ui/assets folder.

Where can I find this path ui/assets ?

I am using a docker container to run opensearchproject/opensearch-dashboards:latest. I tried searching in the container through the interactive shell for this path:ui/assets but I could not find it.

What I also tried but did not work:

I found a folder called assets along this path:

/usr/share/opensearch-dashboards/assets/ and placed my logo.png in there but it did not work.

I tried creating a ui/assets/ in opensearch-dashboards folder and placed my logo.png in there but no luck. Like this: /usr/share/opensearch-dashboards/ui/assets/logo.png

1

There are 1 best solutions below

0
On

I am running OpenSearch Dashboards 2.4.1 in a Docker container, and here's what I did:

  1. Created a folder on my host machine with my logo, e.g. ./assets
  2. Updated my docker-compose.yml file to mount the assets folder in the container:

volumes: - ./assets:/usr/share/opensearch-dashboards/assets

  1. The logo will be served up at this URL: http://localhost:5601/ui/assets/logo.svg