# Serving local files

imgproxy can be configured to process files from your local filesystem. To use this feature, do the following:

1. Set `IMGPROXY_LOCAL_FILESYSTEM_ROOT` environment variable to your local images directory path.
2. Use `local:///path/to/image.jpg` as the source image URL.

:::tip
If filenames in your local filesystem may contain `?`, you may want to set [IMGPROXY_SOURCE_URL_QUERY_SEPARATOR](../configuration/options.mdx#IMGPROXY_SOURCE_URL_QUERY_SEPARATOR) to another string that is not used in filenames or set it to blank to disable query string extraction.
:::

### Example

Assume you want to process an image that is stored locally at `/path/to/project/images/logos/imgproxy.png`. Run imgproxy with `IMGPROXY_LOCAL_FILESYSTEM_ROOT` set to your images directory:

```bash
IMGPROXY_LOCAL_FILESYSTEM_ROOT=/path/to/project/images imgproxy
```

Then, use the path inside this directory as the source URL:

```
local:///logos/imgproxy.png
```

The URL for resizing this image to fit 300x200 will look like this:

```imgproxy_url
http://imgproxy.example.com/insecure/rs:fit:300:200/plain/local:///logos/imgproxy.png@jpg
```

---

## Navigation

- [Getting started](/getting_started)
- [imgproxy Pro](https://imgproxy.net#pro)
- [Installation](/installation)
- [Configuration](/category/configuration)
  - [Configuration options](/configuration/options)
  - [Loading environment variables](/configuration/loading_environment_variables)
- [Usage](/category/usage)
  - [Processing an image](/usage/processing)
  - [Getting an image info](/usage/getting_info)
  - [Signing a URL](/usage/signing_url)
  - [Encrypting a source URL](/usage/encrypting_source_url)
  - [Presets](/usage/presets)
- [Features](/category/features)
  - [Watermark](/features/watermark)
  - [Object detection](/features/object_detection)
  - [Classification](/features/classification)
  - [Autoquality](/features/autoquality)
  - [Best format](/features/best_format)
  - [Chained pipelines](/features/chained_pipelines)
- [Image sources](/category/image-sources)
  - [Serving local files](/image_sources/local_files)
  - [Serving files from Amazon S3](/image_sources/amazon_s3)
  - [Serving files from Google Cloud Storage](/image_sources/google_cloud_storage)
  - [Serving files from Azure Blob Storage](/image_sources/azure_blob_storage)
  - [Serving files from OpenStack Object Storage ("Swift")](/image_sources/openstack_swift)
- [Cache](/category/cache)
  - [External cache](/cache/external)
  - [Internal cache](/cache/internal)
    - [Internal cache: Local filesystem](/cache/internal/local_filesystem)
    - [Internal cache: Amazon S3](/cache/internal/amazon_s3)
    - [Internal cache: Google Cloud Storage](/cache/internal/google_cloud_storage)
    - [Internal cache: Azure Blob Storage](/cache/internal/azure_blob_storage)
    - [Internal cache: OpenStack Object Storage ("Swift")](/cache/internal/openstack_swift)
- [Monitoring](/category/monitoring)
  - [New Relic](/monitoring/new_relic)
  - [Prometheus](/monitoring/prometheus)
  - [Datadog](/monitoring/datadog)
  - [OpenTelemetry](/monitoring/open_telemetry)
  - [Amazon CloudWatch](/monitoring/cloud_watch)
- [Image formats support](/image_formats_support)
- [About the processing pipeline](/about_processing_pipeline)
- [Health check](/healthcheck)
- [Memory usage tweaks](/memory_usage_tweaks)

## Other versions

- [latest (unstable)](/latest/image_sources/local_files)
- [3.31.x](/3.31.x/image_sources/local_files)
- [3.30.x](/3.30.x/image_sources/local_files)
- [3.29.x](/3.29.x/image_sources/local_files)
- [3.28.x](/3.28.x/image_sources/local_files)
- [3.27.x](/3.27.x/image_sources/local_files)
- [3.26.x](/3.26.x/image_sources/local_files)
- [3.25.x](/3.25.x/image_sources/local_files)
- [3.24.x](/3.24.x/image_sources/local_files)
- [3.23.x](/3.23.x/image_sources/local_files)
- [3.22.x](/3.22.x/image_sources/local_files)
- [3.21.x](/3.21.x/image_sources/local_files)
- [3.20.x](/3.20.x/image_sources/local_files)
- [3.19.x](/3.19.x/image_sources/local_files)
