Not rendering private images

Created on 11 April 2025, about 2 months ago

Problem/Motivation

My project uses private file system over S3FS. When rendering images in twig template like:
<img src="{{ file_url(node.field_photos.0.entity.uri.value) }}">
The image is not displayed, instead I see little icon of file with red "x".

I have also tried regular {{ content.field_photos }} and {{ node.field_photos }} with the same result.

The above code works well in other templates, like node etc.

Steps to reproduce

1. Install S3FS, configure activate private file system
2. Configure View Mode pro a node
3. Create View Mode template and add code to display images
4. You get error icon instead of an image

I'd very much appreciate you help :).

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

🇨🇿Czech Republic David Urban

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024