# Importing label studio json and images

**URL:** <https://community.labelstud.io/t/importing-label-studio-json-and-images/361>\
**Category:** Label Studio Support\
**Tags:** data-export\
**Created:** [September 30, 2024, 6:19pm UTC](https://community.labelstud.io/t/importing-label-studio-json-and-images/361 "2024-09-30T18:19:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alundor](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.labelstud.io/alundor/32/156_2.png) [@Alundor](https://community.labelstud.io/u/Alundor)\
**Post date:** [September 30, 2024, 6:19pm UTC](https://community.labelstud.io/t/importing-label-studio-json-and-images/361/1 "2024-09-30T18:19:24Z")

</div>

Hi,

I am importing dataset and labels other have sent me:  
1.My local storage setup:  
path=`/Users/ziqiangzhu/Work/Research/label_studio/project-1-at-2024-09-09-18-00-25495975/images`

1. Path in json

```auto
        "data": {
            "image": "/data/local-files/?d=images/94107602-1.png"
        },

```

1. the problem:  
 ![image](https://canada1.discourse-cdn.com/flex035/uploads/labelstudio/original/1X/85c98ce5f24097161dea21848d8b197f42827861.png)

Your help will be appreciated

---

<div class="post-metadata">

**Author:** ![cv\_engineer](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@cv\_engineer](https://community.labelstud.io/u/cv_engineer)\
**Post date:** [October 17, 2024, 6:50am UTC](https://community.labelstud.io/t/importing-label-studio-json-and-images/361/2 "2024-10-17T06:50:35Z")

</div>

Hello,

I make some experiment with local storage with png images and annotation in json.

Everything works now. Probably my post will be helpful for you question ([link](https://community.labelstud.io/t/how-do-i-upload-annotations-in-the-ms-coco-format-for-images/374/3)).

---

<div class="post-metadata">

**Author:** ![cv\_engineer](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@cv\_engineer](https://community.labelstud.io/u/cv_engineer)\
**Post date:** [October 17, 2024, 6:59am UTC](https://community.labelstud.io/t/importing-label-studio-json-and-images/361/3 "2024-10-17T06:59:41Z")

</div>

I work on Linux and have a directory for Label Studio. I run a Docker container with Label Studio in this directory by command:

```auto
docker run -it -p 8080:8080 -v $(pwd)/mydata:/label-studio/data heartexlabs/label-studio:latest 

```

It mount my local directory `mydata` from Label studio’s directory into directory `/label-studio/data` inside my Label studio’s Docker container.  
All paths below are located inside this Docker container.

I connect the local storage according to the documentation [link]([https://label](https://label/) [stud.io/guide/storage.html#Local-storage](http://stud.io/guide/storage.html#Local-storage)) to place images in it that will be in our project.

In order to activate **Local storage** , we register additional environment variables in the `mydata/.new` file with environment variables for the Docker container [link](https://labelstud.io/guide/start#Set_environment_variables), launching Label Studio:

```auto
LABEL_STUDIO_LOCAL_FILES_SERVING_ENABLED=true
LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT=/label-studio/data/local_storage

```

Launching Label Studio with support for the new environment variables we have set:

```auto
docker run -it -p 8080:8080 --env-file $(pwd)/mydata/.env -v $(pwd)/mydata:/label-studio/data heartexlabs/label-studio:latest

```

I set my local storage path for storing source images as:

```auto
/label-studio/data/local_storage/source_data/scallop

```

I have image path in Labeling web UI like this:

```auto
"image": "/data/local-files/?d=source_data/scallop/Zone_1_35_3.png"

```

The full image path inside Docker container is:

```auto
/label-studio/data/local_storage/source_data/scallop/Zone_1_35_3.png

```

---

<div class="post-metadata">

**Author:** ![cv\_engineer](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@cv\_engineer](https://community.labelstud.io/u/cv_engineer)\
**Post date:** [October 17, 2024, 7:25am UTC](https://community.labelstud.io/t/importing-label-studio-json-and-images/361/4 "2024-10-17T07:25:02Z")

</div>

It seems to me that you have path to storing source images as:

```auto
/Users/ziqiangzhu/Work/Research/label_studio/project-1-at-2024-09-09-18-00-25495975/images

```

Probably you need to set path to your images like:

```auto
        "data": {
            "image": "/data/local-files/?d=94107602-1.png"
        },

```

Or probably you need to set path to storing source images as:

```auto
/Users/ziqiangzhu/Work/Research/label_studio/project-1-at-2024-09-09-18-00-25495975

```

to work with

```auto
"data": {
            "image": "/data/local-files/?d=images/94107602-1.png"
        },

```
