Skip to content
Twig Field Finder
Theme

File — URI / URL

Fill in your field name

Italic values are placeholders: replace them with your own machine names, or let the builder do it.

Reads the entity directly, before field formatters run.

  1. Snippet 1
    {{ node.field_name.entity.getFileUri() }}
  2. Snippet 2
    {{ file_url(node.field_name.entity.uri.value) }}

Reads the content render array, after field formatters run.

  1. Twig
    {{ file_url(content.field_name['#items'].entity.uri.value) }}