@lukecarbis What about using `pathinfo` here instead of regex?

```php
$ext = pathinfo( $file_uri, PATHINFO_EXTENSION );
```