File — URI / URL
Fill in your field nameItalic values are placeholders: replace them with your own machine names, or let the builder do it.
Raw entity
Open in builder (Raw entity)Reads the entity directly, before field formatters run.
- Snippet 1
{{ node.field_name. entity. getFileUri( ) }} - Snippet 2
{{ file_url(node. field_name. entity. uri. value) }}
Render array
Open in builder (Render array)Reads the content render array, after field formatters run.
- Twig
{{ file_url(content. field_name['#items']. entity .uri. value) }}