Animated images (GIF, PNG / APNG, WEBP), are very popular. Such animation consists of several static images called frames, and the information, for how long each frame should be displayed (before going to the next frame). Photopea can open, edit and save animations.
The structure of animation in Photopea
Photopea can generate an animation from a layered document by showing different layers in each frame. To define a new frame, there must be a layer with the name starting with "_a_". It can be a regular layer, a folder of layers, or any other layer.
Once you try to save such document as a GIF, PNG or WEBP (File - Export as - ...), Photopea detects all layers starting with "_a_". The first layer starting with "_a_" is shown in the first frame (others starting with "_a_" are hidden). Remaining frames are generated in the same way.
Example: let us have layers with names ["background", "_a_dog", "_a_cat", "_a_tree", "watermark"]. The result will have three frames (a dog in the first frame, a cat in the second, a tree in the third), "background" and "watermark" will be present in all frames. Try it here!!!
When the layer name starts with "_a_", it will generate a new frame. The delay (from showing this frame until switching to the next frame) is 50 ms by default. To specify your own delay, put the ",XX" to the end of the name of the layer, where "XX" is the delay time in milliseconds.
For example, the layer wit the name "_a_Dog,500" will generate a frame, that will be shown for half a second.
Loading animated GIFs, PNGs and WEBPs
When you load an animated GIF, PNG or WEBP into Photopea, each frame is converted into a separate layer with a proper name. It means, that you can easily open an animation, resize it, delete or reorder frames, and save it back, without worrying about layer names.
You can also add new layers to an existing animation (to be shown in all frames, like watermarks) without changing layer names.