We defined PreviewIcons as SVG for our mask elements. These icons are stored in the table sys_file.
Usually the should just be loaded from the file system, without any entry in the sys_file table.
By taking a look into the PreviewIconResolver.php I found out that the problem is caused by the function:
$this->resourceFactory->retrieveFileOrFolderObject
There probably is some logic behind the function which automatically creates an entry in the sys_file table.
I suggest to use the function PathUtility::getPublicResourceWebPath instead
We defined PreviewIcons as SVG for our mask elements. These icons are stored in the table sys_file. Usually the should just be loaded from the file system, without any entry in the sys_file table.
By taking a look into the PreviewIconResolver.php I found out that the problem is caused by the function:
$this->resourceFactory->retrieveFileOrFolderObject
There probably is some logic behind the function which automatically creates an entry in the sys_file table.
I suggest to use the function
PathUtility::getPublicResourceWebPath
insteadTested on: TYPO3 12.4.22 PHP 8.3