Adding timestamps in css() function for files that use "@auto"

I am trying to implement timestamps to css assets. By using this source: CSS URLs | Kirby CMS, I managed to add timestamps to all css files except the ones that are template specific (’@auto’). Any ideas on how I could solve this? Thanks in advance!

I cannot reproduce this, with the code the timestamp is also added to template specific files.

What is your Kirby version? How do you include the files?

Hi, thanks for your reply. I am using following code in template (based on Kirbys’ starterkit):

   <?= css([

Kirby version: 3.5

you might try one of the three plugins: fingerprint, cachebuster or hashed-assets

What version exactly?

It should actually work out of the box with the component.

When I add this in a plugin file in a fresh Starterkit

use Kirby\Cms\App;
Kirby::plugin('my/css', [
   'components' => [
      'css' => function (App $kirby, string $url, $options = null): string {
          $relative_url = Url::path($url, false);
          $file_root = $kirby->root('index') . DS . $relative_url;

          if (F::exists($file_root)) {
              return url($relative_url . '?' . F::modified($file_root));

          return $url;

the timestamp are correctly added to all files, as can be seen for the auto-loaded home.css here:

Hi! Ok, perhaps I simply did something wrong. Will try to redo it. Thank you!