image icon indicating copy to clipboard operation
image copied to clipboard

GIF animation not playing?

Open CyferZ opened this issue 3 years ago • 0 comments

Hi there,

Just wanna say this library is fantastic, and good work!

The issue I am having is as follows: The user is able to upload any image they like. Upon uploading, I store it, run the make function, resize the image and use a callback function within it, and save like below:

$imagePath = $img->store('/' . $category, 'projects');

                    $image = Image::make("storage/projects/{$imagePath}")
                                    ->resize(null, 720, function ($constraint) {
                                        $constraint->aspectRatio();
                                        $constraint->upsize();
                                    });
                    $image->save();

Unfortunately, when it comes to GIFs, once it has been uploaded, it no longer plays the animation. Would the resizing be causing this by any chance? I am at a loss, but I am adding resizing to reduce the size of the image once stored on the server to enable quicker rendering on the site.

CyferZ avatar Feb 06 '22 12:02 CyferZ