I've searched the forum, and have seen a few somewhat similar threads, but none have answered my problem.
I'm running 2.0 RC3, and have avatar permissions set to allow only uploaded avatars, with a size limit of 150x200px.
A user has complained that his uploaded gif avatar loses it's animation, even though it is 15x200px in size.
I've confirmed this, and even tried uploading the avatar for him, but again, the resulting avatar is just a dingle frame.
What I've noticed, is it seems that the image, once uploaded, is being converted to a PNG file (which explains the loss of animation).
Why is this happening, and how can I change it?
I've tested with other animated gifs (though much smaller in dimensions) and they work fine.
this is a known bug/feature. at the moment there's no solution, but devs are working on it. however, it is confirmed that even when introduced it won't work in all browsers. check wikipedia for "APNG" to see the list of browsers that support this feature
Thanks for the info.
Is there any easy explanation as to how the software chooses what gifs to "allow" and what ones to not? (ie. some animated gifs work, some don't).
at the moment if the gif needs to be resized, it automatically is reduced to the first image of animation. up until now, when you were using SMF to upload your avatar it was automatically converted to PNG loosing everything apart the first frame of the animation.
recently however Nao mentioned that this part of SMF is being rewritten, so keep your fingers crossed :)
check out this post it might help.
http://gcwebhosting.com/forum/index.php?topic=307.0
Animations does work only with url ink
The part I don't get is why my forum is resizing the gif though. It's at 150x200 px, which is what I have set as the avatar size limit.
I even tried reducing it's dimensions in Photoshop and then reuploading, still no good.
I guess I could open up the permissions to allow external avatars, and try that. Just weird that the avatar upload works for some animated gif's (very small ones I've tried), but not this other one, when it is still below my size limit settings. :-\
That is odd. Can you give us some examples so we can run them on test sites?
according to the url I posted:
There are three ways you can achieve resized avatars while keeping the animation.
1) You can specify the URL as Frank pointed out. Once you find an avatar you like, save it and upload it to your server (keep it in an easy-to-reach folder such as www.yoursite.com/myavatars/). In your profile, for the avatar selection, choose Specify avatar by URL and then type the URL to the newly uploaded image (such as http://www.yoursite.com/myavatars/sheep.gif).
2) The other way (and my preferred method) is to save the gif to your computer, then use any graphics program, resize it to match the allowed avatar size on your site, and upload it to your folder. This method requires a bit more work and some basic knowledge of image manipulation, but gives better control over the end product.
3)this was resolved by setting avatar to be resized using javascript in the admin panel. Choosing this option, and then specifying the URL to an avatar, allowed the avatar to remain animated.
The javascript resize is by far the better option (I'm not sure the html resize is worth having) but still, no resizing should be done on images that are less than the set size limits.
Lainaus käyttäjältä: Antechinus - kesäkuu 09, 2010, 01:53:30 AP
The javascript resize is by far the better option (I'm not sure the html resize is worth having) but still, no resizing should be done on images that are less than the set size limits.
yes you are correct no resize if the image is within the limits.
Lainaus käyttäjältä: Antechinus - kesäkuu 09, 2010, 01:44:26 AP
That is odd. Can you give us some examples so we can run them on test sites?
This is the gif that won't work.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg691.imageshack.us%2Fimg691%2F2697%2Fsyko.gif&hash=e85edac8024b365f3fcf15d5aadfa4ca151eb2c7)
It won't work if it's being resized, and possibly additionally being flagged as dangerous (which forces re-encoding anyway), since the GD library in PHP cannot deal with animated images.
I'd note that other forum environments have EXACTLY the same problem because it's a software limitation of the underlying platform, and spending all the effort in writing a new animation widget when, to be honest, you could just host it on Photobucket or something and link it via URL... sort of makes it not worth the effort.
I appreciate the responses, but wanted to reiterate that the gif in question (the one posted above) is not being resized. It's dimensions are smaller than the forums limit (150x200). Other gif's that are within the size limit seem to work fine.
Is there a file size (ie. kb) limit set somewhere I don't know about?
Regardless, it appears the only way to get this gif to work will be to open up external avatars.
If it's triggering the unsafe attachment filter, the ONLY way will be external avatar because it will always be re-encoded. But to be fair, it's a bug in a pre-release version of SMF 2.0...
Ok, thanks, topic marked solved.
Cool. Got a couple of ones that do work? It would be interesting to analyse the differences.
Well, as an example, I just grabbed a random gif from a Google search, and the following gif works fine as an uploaded avatar:
http://www.animatedgif.net/cartoons/A_5odie_e0.gif
I also tried this one: http://www.animatedgif.net/cartoons/3dsub0_e0.gif and it failed.
So, I'm thinking it's a file-size issue??
I doubt it's filesize, since the one that doesn't work is under 100K.
I still think it's falling foul of the zealous anti-malicious check in files.
Probably. :)
Another way around this is to :
1. Create a sub gallery
2. Upload the desired avatar to it
3. Choose it via the user cp
I know this topic is 2 years old, but Im having the same problem, and instead of creating a new topic ill just reply here..
I have created some animated gifs, yet they work in the browser, but not when I upload them as an avatar.
I have disabled autoresizing to PNG, yet it still doesnt work..
Any more info on this?
Ten years later this issue still persists. And this not only for the avatars.
As stated previously... it's not the uploaded gif that is the problem.
It's when you upload a gif that has to be resized. This will cause the gif to lose animation.
This is not, technically, an SMF bug.... it's an issue with the server side graphics handling tools.
It resizes the gif and saves just the first frame of the animation.
Solution 1- don't allow uploaded avatars to be resized.
Solution 2- don't allow uploaded avatars.