source/php/App.php
public function removeThumbnails($filename)
    {
        $file = pathinfo($filename);

        // Regexp pattern to find thumbs
        $pattern = '/' . $file['filename'] . '-([0-9]+)x([0-9]+)\.' . $file['extension'] . '/';

        $remove = (array) glob($file['dirname'] . '/*.' . $file['extension']);
        $remove = array_filter($remove, function ($item) use ($pattern) {
            return preg_match($pattern, $item);
        });

        array_map('unlink', $remove);

        return true;
    }
public function removeThumbnails($filename)
    {
        $file = pathinfo($filename);

        // Regexp pattern to find thumbs
        $pattern = '/' . $file['filename'] . '-([0-9]+)x([0-9]+)\.' . $file['extension'] . '/';

        $remove = (array) glob($file['dirname'] . '/*.' . $file['extension']);
        $remove = array_filter($remove, function ($item) use ($pattern) {
            return preg_match($pattern, $item);
        });

        array_map('unlink', $remove);

        return true;
    }
public function removeThumbnails ( $ filename ) { $ file = pathinfo ( $ filename ) ; // Regexp pattern to find thumbs $ pattern = '/' . $ file [ 'filename' ] . '-([0-9]+)x([0-9]+)\.' . $ file [ 'extension' ] . '/' ; $ remove = ( array ) glob ( $ file [ 'dirname' ] . '/*.' . $ file [ 'extension' ] ) ; $ remove = array_filter ( $ remove , function ( $ item ) use ( $ pattern ) { return preg_match ( $ pattern , $ item ) ; } ) ; array_map ( 'unlink' , $ remove ) ; return true ; }
Remove thumbnails for a image
@param  string $filename Path to original file
@return boolean
Remove thumbnails for a image