joomla/joomla-platform — pull request #1754 by dongilbert (2012-12-13 04:07:50+00:00)
Title: Adding ability to custom format filename of generated thumbnails

This PR adds a new `$format` parameter to the `createThumbs` method that allows you to specify the filename format to use when generating and saving thumbnails. It must contain the following three strings, which will be replaced when saving a thumbnail:

```php
/**
* {filename} - replaced with original files name
* {width} - replaced with width of generated thumbnail
* {height} - replaced with height of generated thumbnail
*/

// The default format
$format = '{filename}_{width}x{height}';

// Alternative format (that I use)
$format = '{width}x{height}_{filename}';
```

If any one of the three are missing, an InvalidArgumentException is thrown.