Entity
- Type : block
- Field : 'Reference to entity : image style' (field_image_style)
- Manage display : I display the Entity ID
Twig
In my twig template, I get the field_image_style data from content.field_image_style
.
Issue
Works great on admin user, but not when browsing the website as an anonymous user.
This is not a image style generation error, or a wrong permission to files folders : you can access to both original image and generated styled image on anonymous.
And this is where it gets weird. It's working when you give the "Administer image styles" permission to anonymous users.
Dump
Just to show you what result I have, here's a dump of content.field_image_style
with an admin user :
And with an anonymous user :
image_style
twig filter