1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Server Issue Animated Avatars

Discussion in 'Resolved Bug Reports' started by Wuebit, Dec 18, 2013.

  1. Wuebit

    Wuebit Well-Known Member

    Howdy.

    On my test site I have attachments limit set to 10mb and the size show when uploading is 200x200px

    Ive just uploaded a Gif file and it does not move (as in no animation)
    I even tried to upload it though the admin panel editing the user with the same result.

    I also tested a smaller image (less than 200x200) and it worked fine.

    I also get no errors so can't provide one.

    To reproduce just upload a 200x200 animated Gif image.
     
  2. Mike

    Mike XenForo Developer Staff Member

    To maintain animation with resized images, you need to use ImageMagick as your image processor. GD doesn't support animation.
     
    bortrenamo likes this.
  3. Wuebit

    Wuebit Well-Known Member

    Hmm the smaller one's worked via GD Mike. I'll test with ImageMagick now.
     
  4. Mike

    Mike XenForo Developer Staff Member

    The smaller ones don't get resized at the "full" size. (The full size is actually 192 max width.)
     
    Wuebit likes this.
  5. Wuebit

    Wuebit Well-Known Member

    That explains alot :) I'll test with ImageMagick after I install it.
    Cheers
     
  6. Wuebit

    Wuebit Well-Known Member

    Mike when uploading a a gif not as an avatar but on a post does imagemagick make the thumb?
    Also when uploading a none gif with imagemagick selected as the default image processor does GD make this thumb?
     
  7. Mike

    Mike XenForo Developer Staff Member

    Whenever a image needs to be processed (resized, etc) for any reason, your selected image processor is used.
     
  8. Wuebit

    Wuebit Well-Known Member

    Than I think I have some problem here.
    Any image other than a Gif will work fine but if I upload a Gif it get's stuck on 100%
    [​IMG]
     
  9. Mike

    Mike XenForo Developer Staff Member

    It's possible there are issues with ImageMagick, but equally, this is one of the tradeoffs. If you resize an animated image, it's like resizing a large number of images (each frame is resized), so it can trigger timeouts/memory issues more easily.
     
  10. Wuebit

    Wuebit Well-Known Member

    I'll have a look into it than. On a off note is there a way to disable animated avatars all together?
     
  11. Mike

    Mike XenForo Developer Staff Member

    No, not explicitly. Though note that you'd only possibly see the animated version on the profile (if you use GD).
     
    Wuebit likes this.
  12. AndyB

    AndyB Well-Known Member

    What I have done on my forum is disable uploading of .gif for avatars.

    You can make a simple hack in the core file like this:

    library/Xenforo/Model/Avatar.php

    this hack prevents gif's from being uploaded as an avatar.

    Line 59

    Original code
    =============
    PHP:
    if (!in_array($imageType, array(IMAGETYPE_GIFIMAGETYPE_JPEGIMAGETYPE_PNG)))
    {
        throw new 
    XenForo_Exception(new XenForo_Phrase('uploaded_file_is_not_valid_image'), true);
    }
    Hacked code
    ===========
    PHP:
    if (!in_array($imageType, array(IMAGETYPE_JPEGIMAGETYPE_PNG)))
    {
        throw new 
    XenForo_Exception(new XenForo_Phrase('uploaded_file_is_not_valid_image'), true);
    }
     
    Wuebit likes this.
  13. DJ XtAzY

    DJ XtAzY Active Member

    You should make sure you have the latest version of ImageMagick and the imagick extension.
     
  14. Wuebit

    Wuebit Well-Known Member

    Aye I do mate.
     
  15. DJ XtAzY

    DJ XtAzY Active Member

    Do you use cPanel\WHM?
     
  16. Wuebit

    Wuebit Well-Known Member

    No mate I do not.
     

Share This Page