---
title: "Feature: #108344 - Allow number of decimals in stdWrap.bytes function"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-108344-1764239726"
source: "Changelog/14.1/Feature-108344-AllowNumberOfDecimalsInStdWrapbytesFunction.rst"
typo3-version: "14.1"
typo3-major: 14
type: "feature"
issue: 108344
forge: "https://forge.typo3.org/issues/108344"
tags: ["TypoScript", "ext:frontend"]
rendered: "2026-10-03T08:19:36+00:00"
---

# Feature: #108344 - Allow number of decimals in `stdWrap.bytes` function {#feature-108344-1764239726}

See [forge#108344](https://forge.typo3.org/issues/108344)

## Description {#description}

The TypoScript function `stdWrap.bytes` now accepts an additional
configuration parameter `decimals`. It allows to explicitly define
the number of decimals in the resulting number representation. By default, the
number of decimals is derived from the formatted size.

In addition, the consumed PHP function
`\TYPO3\CMS\Core\Utility\GeneralUtility::formatSize` is extended as well.
The additional parameter `$decimals` is added and defaults to `null`,
which results in the same behavior as for the TypoScript function
`stdWrap.bytes`.

### Example {#example}

```typoscript
lib.fileSize = TEXT
lib.fileSize {
    value = 123456
    bytes = 1
    bytes.decimals = 1
}
```

## Impact {#impact}

By allowing to configure the number of decimals in `stdWrap.bytes`,
integrators can now better adapt the output of the formatted size returned by
the TypoScript function. This was previously not possible by default and needed
some workarounds in TypoScript.
