I have an animated gif with transparent background, and I want to add a background image to all layers:

enter image description here

How can I achieve it without adding it to every layer individually?

  • 1
    You could stack the two images in HTML/CSS. – Scott Oct 25 '13 at 17:57
  • It is an option. But I'd prefer to use it like one image. – Manolo Oct 25 '13 at 18:35
  • did the multi-layers-merger extension work for you? – ryanlerch Apr 26 '14 at 14:49

In the GIMP it is possible with the multi-layers-merger extension from here:

(original) http://registry.gimp.org/node/26135

(archived project) https://github.com/pixlsus/registry.gimp.org_static

(location of plugin extension within that project) https://github.com/pixlsus/registry.gimp.org_static/tree/master/registry.gimp.org/files/

Install the extension, then

  1. Create a new image the same size as your animation, and put your background image in a single layer in the new image.

  2. Go to Layers > Multi Layers Merger

  3. Deselect all the options but "Use only active layer". This means to only merge the active layer of the background image.

  4. Make sure the "Second Image to merge with" dropdown is the image with your animation frames in it

  5. Click OK, and a new image should be created with your background behind each frame.

| improve this answer | |
  • Nice find! Welcome to GD.SE :) – Yisela Apr 24 '14 at 2:39
  • looks like this is not valid anymore (ubuntu user) – mazs Mar 24 '17 at 14:44
  • Ryan's answer still seems valid for me: Windows, GIMP 2.8 – RichardG Mar 5 '18 at 15:13
  • Still valid, Windows 10, GIMP v2.10. First time user of GIMP too. – Steven_BDawg Jun 11 '18 at 6:41

Here is how to do it in Photoshop. It may be helpful, I think.

  1. First open a stable picture/background that you want to put a gif on. This is mine: click.
  2. Open your gif. File > Import > Video Frames to Layers. /help image In the File Name type this: . /help image, find your gif and on this little window that pops up just click OK. You can skip this step if you have your gif already opened (because you were making it - how to make gifs tutorial you can find here).
  3. Window > Animation. /help image Something like this will show up.
  4. Now you work on the gif. Click on this little arrow with lines in the top right corner of animation window and pick Select All Frames. /help image
  5. Click on this arrow again and pick Copy Frames. /help image
  6. Go to your background. Click on the arrow and pick Paste Frames. /help image You must check Paste Over Selection when the little windows pops up. /help image
  7. Now you must ensure that the background picture is under ALL of the frames. To do that you must pick every frame one by one and in the Layers window you must check a visibility of the background - click on the little square and a little eye will appear. Here the visibility is off, here it’s on. Do it with all of the frames.
  8. Now it’s the time to move your gif. You must select all of the frames AND all of the layers (but WITHOUT the background picture!) and then click ctrl + t on your keybord and move the gif. /help image
  9. That’s all. Now to save the gif: File > Save For Web and Devices. /help image Remember that it must be smaller than 1 MB (1000 KB)
| improve this answer | |
  • 1
    This is for Photoshop. I'm working with Gimp. – Manolo Oct 25 '13 at 11:58
  • Although we obviously want to help the person asking, we are also trying to keep our questions as software-independent as possible, so this is perfectly valid as an alternative. What we don't normally do is have link-only answers, because links die, so I just added some content from the site you mentioned. – Yisela Apr 24 '14 at 2:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.