Search code examples
phpfile-get-contentsanimated-gif

file_get_contents animated gif


calling file_get_contents on the URL of an animated GIF (https://media.tenor.com/images/4f20af75f32887384aab7e49c37537ae/tenor.gif) and saving this content to a local file, will lose the animation.
animation lost

How can I keep the animation ?

thanks


Solution

  • The problem was caused by the use of the resize method of the Intervention/Image package, after the upload, which loses the animation.

    I am now using imagick's convert command to resize the animated GIF, and it works.