6

Is it possible to delete the original files after image conversion using Spatie Media Library (v7) - for example, the client uploads huge resolution files, but we only need them about 1000px wide and dont want to store the huge originals.

Cheers in advance!

apokryfos
  • 38,771
  • 9
  • 70
  • 114

1 Answers1

0

My understanding is no. You have to do it manually yourself

A) save one of the smaller images back as the main.
B) manually code a delete or unlink of file

unlink($media->getPath());
tristanbailey
  • 4,427
  • 1
  • 26
  • 30