Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Provides a Twig Extension, that you can use in your Twig Templates. In twig when you get the value of a file, the size is in simple bytes and if you're intending to show it to your end-user, it's not user-friendly, this simple Twig filter helps with that and renders the file size in it's respected: 'B', 'KB', 'MB', 'GB', 'TB'
Example:
{{ node.field_attachment.entity.field_file.entity.filesize.value | format_bytes }}
Supporting organizations:
Initial development and maintenance
Sponsorship
Project information
- Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed. - Maintenance fixes only
Considered feature-complete by its maintainers. - 1,248 sites report using this module
- Created by doxigo on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
2.0.1
released 17 November 2022
Works with Drupal: ^8 || ^9 || ^10
✓ Recommended by the project’s maintainer.
Install: