Skip to content
Discussion options

You must be logged in to vote

Hi @AlejandroAkbal,

I've just added support for GIF when using MediaMp4Converter and MediaWebmConverter. You should now be able to convert gif with those converters.

Note that you might want to adjust the default settings of those converters, depending on the actual size and quality of your gif.

You can also convert gif at upload time using the transform method like this:

use Illuminate\Http\File;
use Spatie\TemporaryDirectory\TemporaryDirectory;
use Spatie\Image\Image;
use Spatie\Image\Enums\Fit;

new MediaCollection(
    name: 'files',
    transform: function (File $file, TemporaryDirectory $temporaryDirectory): File {
        $input = $file->getRealPath();
        $output = $temporaryD…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@AlejandroAkbal
Comment options

Answer selected by AlejandroAkbal
Comment options

You must be logged in to vote
1 reply
@AlejandroAkbal
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants