Is there any way to check if an image URL returns an animated or not GIF?
I need to save image URLs and then show the images on my site, so I would like to allow GIF extension, but I need to avoid animated GIFs. Is it possible to detect that on the fly with out downloading the image?
Check out this comment to the documentation for function imagecreatefromgif (on php.net). You still need to first download the image file even if you are just going to link to it later.
I think, ImageMagick really will be your best chance:
identify -format %n posible_animation.gif
Please check the forum post How to identify animated image format for more information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With