# `Emerge.Config.RuntimePaths`
[🔗](https://github.com/emerge-elixir/emerge/blob/v0.5.1/lib/emerge/config/runtime_paths.ex#L1)

Allow images from outside your application's `priv/` directory. Set this record
as `Emerge.Config.Assets.runtime_paths`. This controls runtime image paths,
not your application's general filesystem access.

```elixir
%Emerge.Config{
  assets: %Emerge.Config.Assets{
    runtime_paths: %Emerge.Config.RuntimePaths{
      enabled: true,
      allowlist: ["/data/photos"]
    }
  }
}
```

## Fields

- `enabled` — `false` by default. Set `true` to allow runtime sources such as
  `{:path, "/data/photos/photo.jpg"}`; an allowlist is also required.
- `allowlist` — allowed absolute directory roots; defaults to `[]`, allowing
  no runtime files. Keep the list as narrow as possible.
- `follow_symlinks` — `false` by default, rejecting symlink path components.
  With `true`, resolved paths must still fall within an allowed directory.
- `max_file_size` — positive encoded-file size limit in bytes; defaults to
  `25_000_000`. This does not limit decoded image dimensions or peak memory.
- `extensions` — allowed filename extensions, including their leading dot.
  Defaults to `[".png", ".jpg", ".jpeg", ".webp", ".gif", ".bmp", ".svg"]`.
  The list replaces these defaults when supplied.

Logical application assets do not need this opt-in. All fields require a new
viewport to change. See [Use assets](use_assets.html) for source syntax.

# `normalized_t`

```elixir
@type normalized_t() :: t()
```

Canonical form after nested keyword records have been expanded.

# `options`

```elixir
@type options() :: [
  enabled: boolean(),
  allowlist: [String.t()],
  follow_symlinks: boolean(),
  max_file_size: pos_integer(),
  extensions: [String.t()]
]
```

Typed keyword shorthand accepted in this record's parent field.

# `t`

```elixir
@type t() :: %Emerge.Config.RuntimePaths{
  allowlist: [String.t()],
  enabled: boolean(),
  extensions: [String.t()],
  follow_symlinks: boolean(),
  max_file_size: pos_integer()
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
