src/Handlers/ImageHandler.php
public function removeCrops()
    {

        // Get original file name
        $justTheName = pathinfo($this->originalImagePath, PATHINFO_FILENAME);

        // Get all the files to remove
        $filesToRemove = glob( sprintf( '%s/%s-*', $this->cropsFolder, $justTheName ) );

        // Delete the crops from list
        foreach($filesToRemove as $file){ // iterate files
            // Check if this is a file
            if(is_file($file))
                unlink($file); // delete file
        }

        // Return $this for chaning
        return $this;
    }
public function removeCrops()
    {

        // Get original file name
        $justTheName = pathinfo($this->originalImagePath, PATHINFO_FILENAME);

        // Get all the files to remove
        $filesToRemove = glob( sprintf( '%s/%s-*', $this->cropsFolder, $justTheName ) );

        // Delete the crops from list
        foreach($filesToRemove as $file){ // iterate files
            // Check if this is a file
            if(is_file($file))
                unlink($file); // delete file
        }

        // Return $this for chaning
        return $this;
    }
public function removeCrops ( ) { // Get original file name $ justTheName = pathinfo ( $ this -> originalImagePath , PATHINFO_FILENAME ) ; // Get all the files to remove $ filesToRemove = glob ( sprintf ( '%s/%s-*' , $ this -> cropsFolder , $ justTheName ) ) ; // Delete the crops from list foreach ( $ filesToRemove as $ file ) { // iterate files // Check if this is a file if ( is_file ( $ file ) ) unlink ( $ file ) ; // delete file } // Return $this for chaning return $ this ; }
Reset all created crops for the image

@return $this
Reset all created crops for the image