Bug in WordPress image uploader for GIF files (4 posts)

  1. Vijay Padiyar
    Posted 4 years ago #

    There is a bug in WordPress image uploader for GIF image files.

    When GIF images are uploaded to the web server using WordPress image uploader, the following error appears when the file is opened using PHP imagecreatefromgif() function (typically used by TimThumb image resizing script):

    [26-Dec-2011 14:10:31] PHP Warning: imagecreatefromgif() [function.imagecreatefromgif]: '/wp-content/uploads/image.gif' is not a valid GIF file in /wp-content/themes/my-theme/scripts/thumb.php on line 295

    [26-Dec-2011 14:10:31] PHP Warning: Cannot modify header information - headers already sent by (output started at /wp-content/themes/my-theme/scripts/thumb.php:295) in /wp-content/themes/my-theme/scripts/thumb.php on line 713

    The error is not seen if the image is uploaded directly via FTP or cPanel File Manager.

    It looks like the GIF file headers are tampered or corrupted by WordPress image uploader.


    Vijay Padiyar

  2. Vijay Padiyar
    Posted 4 years ago #

    Forgot to mention, I am using WP.SmushIt plugin also to optimize images upon upload.

    To be honest, I am not sure as to whether the problem existed before too, or started after I began using WP.SmushIt.

  3. FRscratch
    Posted 4 years ago #

    Thank's very much Vijay.
    Just published a simple gif animation on http://grfr.nl/

  4. esmi
    Forum Moderator
    Posted 4 years ago #

    The issue appears to be with timthimb - not WordPress.

Topic Closed

This topic has been closed to new replies.

About this Topic