Rename assets to lowercase As there is no native config to control the naming of assets I am trying to write a small plugin to do this.
Here is what I have;

    craft()-&gt;on('assets.saveAsset', function (Event $event) {
        if ($event-&gt;params['isNewAsset']) {

            $asset = $event-&gt;params['asset'];

            // Set the filename to a variable, appending the file extension
            // $extension = $asset-&gt;getExtension();
            // $filename = strtolower($asset-&gt;filename.md5(time()).'.'.$asset-&gt;getExtension());
            $filename = strtolower($asset-&gt;filename.'.'.$asset-&gt;getExtension());

            // Rename the file on the server
            craft()-&gt;assets-&gt;renameFile($asset, $filename);

            // Set filename attribute and re-save asset
            $asset-&gt;setAttribute('filename', $filename);
            craft()-&gt;assets-&gt;storeFile($asset);
        }
    });


However, this currently results in a duplication of the extension like so;
model-rendering-image.jpg.jpg
special-services.jpg.jpg  

If I remove this part of the code 
'.'.$asset-&gt;getExtension()) then the asset isn't renamed at all.

Can't seem to get past this hurdle.

Anyone able to shed some light?

Also is there a reason that assets are not renamed to lowercase by default or why this isn't rolled in as a config option?
Just tested your code and it worked as you'd expect if you leave off the extra getExtension() call (the filename property already includes the extension).

$filename = strtolower($asset-&gt;filename);


If it's not saving for you with that, you've got some other error happening elsewhere.