From Test-Scratch-Wiki
![]() | Flashy GIFs (ones that switch very different frames rapidly) may be irritating and can even cause photosensitive epileptic seizures. It is best to not use them in user icons, signatures, or studio thumbnails. If one is being used in a project, it is wise to give a seizure warning in the Notes and Credits. |
![]() | GIFs may lag. It is usually recommended to preload GIFs in a project or use slow-moving GIFs with fewer frames. Compressing large GIFs is appreciated. |

Animated GIFs are GIF files with multiple frames that can be played in a sequence, making an animation. Animated GIFs are often used as profile pictures and signatures.
They are very popular all over the Internet due to the fact it's animated unlike other file types, however, are frequently criticized for overuse, lag, and annoyance, especially of flashy ones.
How to Import an Animated GIF into Scratch
The steps on how to import an Animated GIF are listed below:
- Download the animated GIF.
- Click on the import button on the sprite's costumes and select the file.
- The Costumes Pane should create a new costume for every frame of the animation (This may take a while for large *.gif files).
![]() | Scratch does not take into account GIFs that have been compressed, a method in which each frame only shows the pixels changed from the previous frame causing randomly splattered frames. For example, if there was a compressed GIF of a walking sprite, the first frame would be whole. Every other frame would only show the walking sprite.[1] That is because only the walking sprite is moving or changing. To prevent this, make sure each frame contains a solid background. This can be fixed by using this script below: |
next costume stamp
Animating the GIF
- Main article: Animating a Sprite
![]() | Please remember to adjust the scripts shown in this tutorial as necessary to best fit a project. |
The following lists steps on how to script an animation to script the animation:
- A simple way to animate the GIF file in Scratch is to use the following script.
when gf clicked switch costume to [1 v] set [fps v] to [16] forever next costume wait ((1) / (fps)) secs
- One could just as easily swap out the "fps" (short for frames per second) variable for any arbitrary number. A higher value will increase the speed and the value "0" will cause an error. A typical frame rate for movies is 24 FPS.
- See this script in action here.
Costumes to Animated GIFs
Just like Scratch can turn animated GIFs into costumes, some people want to be able to turn costumes into animated GIFs.[citation needed] This would be very useful as people would be able to export their Scratch animation to another program. Currently, this is not a feature, but there are external and online tools that support this feature, which requires exporting the costumes (can be time-consuming).
What a GIF is
A GIF, the acronym of a graphic interchange format, is an animating lossless format for image files that supports both animated and static images. There is no limit for how many frames there are in a gif but the longer it is, the bigger it is, and sometimes a bit laggier.
GIF Rules
- One should not use GIFs that will distract users and they must follow the Community Guidelines.
- Things that are not recommended/allowed are flashy GIFs (such as rapid blinking and switching colors) or GIFs that breaks the Community Guidelines.
- Using hilarious GIFs are highly recommended as profile images and not on other things as they might distract viewers. If it is questionable, it should probably not be used.
- Try to use a GIF which relates to the topic. Using random GIFs won't help much unless it involves a user's profile image.
References
- ↑ cheddargirl. (3/7/2013). "The next frame only displays the pixels that have changed from the previous frame before it." https://scratch.mit.edu/discuss/post/71657/