Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

How to get file size?

Started by Muut Archive 11 years ago · 3 replies · 502 views
11 years ago

Hello,
Previously (version 0.9.21) I used

TWIG
{% set files = page.media.files %} 
{% for file in files %}
   {{ file.size }}
{% endfor %}

and it worked like a charm. But after upgrading to version 0.9.26 I get file names instead

11 years ago

I've asked @gert to answer this as he did some refactoring in the media handling recently.

11 years ago

The size property is not available anymore in the current release. We will review if it's possible to add it again in the next release and keep you up to speed here.

11 years ago

Thank you for your reply and I hope it will be added again

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1327 9 years ago
Archive · by Muut Archive, 9 years ago
2 921 9 years ago
Archive · by Muut Archive, 9 years ago
2 4050 9 years ago
Archive · by Muut Archive, 9 years ago
1 2928 9 years ago
Archive · by Muut Archive, 9 years ago
3 1107 9 years ago