0

I'm using SonataMediaBundle. Is it possible to retrieve additional informations about images in twig?

This sentence retrieve image:

{% media item.image, 'big' %}

Can I retrieve for example author, description, copyright etc.? I can set this informations in SonataAdmin.

EDIT: I found solution:

{{item.image.description}}
repincln
  • 2,029
  • 5
  • 24
  • 34

1 Answers1

1

I found the answer. To retrieve additional informations about image simply use:

{# image description #}
{{item.image.description}}

{# image author #}
{{item.image.authorName}}

{# etc. #}
repincln
  • 2,029
  • 5
  • 24
  • 34