Search code examples
laravel-5intervention

How to delete image with Intervention.io library for Laravel 5


I am using http://image.intervention.io/ library for Laravel 5.

I got everything working fine, but i cannot seem to find a delete()/remove() method.

Is this something that's not part of their library, because documentation doesn't mention it either. Or is there a "secret way" to unlink file via this library?


Solution

  • Just use Laravel Filesystem

    Storage::delete('file.jpg');
    
    Storage::delete(['file1.jpg', 'file2.jpg']);
    

    InterventionImage library has no methods delete() or destroy().