I have had a bit of problems with the plugin while using it on a site with origin-pull cdn. The generated thumb file name remaining the same as the original, it did not get pulled by the CDN nodes, and instead the old one was still being served. So I looked into the way WP does for the edited images and I am suggesting this small change: adding a suffix to the image or perhaps adding a timestamp.
Thanks and looking forward on your opinion,
Mile
/*
* ================
* Get the filename
* ================
* See image_resize function in wp-includes/media.php to follow the same conventions
* - Check if the file exists
*/
function pte_generate_filename( $file, $w, $h ){
$info = pathinfo( $file );
$ext = $info['extension'];
$name = wp_basename( $file, ".$ext" );
$suffix = "{$w}x{$h}".'-pte'; // or .time()
//print_r( compact( "file", "info", "ext", "name", "suffix" ) );
return "{$name}-{$suffix}.{$ext}";
}