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, 2013 at 17:57
  • It is an option. But I'd prefer to use it like one image.
    – Manolo
    Oct 25, 2013 at 18:35
  • did the multi-layers-merger extension work for you?
    – ryanlerch
    Apr 26, 2014 at 14:49

4 Answers 4


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.

  • Nice find! Welcome to GD.SE :)
    – Yisela
    Apr 24, 2014 at 2:39
  • looks like this is not valid anymore (ubuntu user)
    – magor
    Mar 24, 2017 at 14:44
  • Ryan's answer still seems valid for me: Windows, GIMP 2.8
    – RichardG
    Mar 5, 2018 at 15:13
  • Still valid, Windows 10, GIMP v2.10. First time user of GIMP too. Jun 11, 2018 at 6:41
  • Valid still for Windows 10, GIMP v2.10.34, as of today. A few notes: there should be a step 6 where you delete the background layer afterward--otherwise it'll be included in the gif. For those confused to install: GitHub link > "Go to file" > type "multi-layers-merger" > download button > it's an ".scm" file so put it in the "scripts" folder instead of "plug-ins" > restart GIMP after installed script > follow instructions in answer. Jun 11, 2023 at 18:33

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)
  • 2
    This is for Photoshop. I'm working with Gimp.
    – Manolo
    Oct 25, 2013 at 11:58
  • 2
    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, 2014 at 2:57

To All who use GIMP to animate.

THIS WORKS!!-To anybody STILL having this trouble like I did, coming across this i have another solution that works wonders. With your .gif layers loaded, make Your Background on it's own layer THEN in the 'Plug-ins' FX-Foundry they have a selection just for 'Animations' Click combine with background....wait then remove/save your bg then export your newly made .gif all set :D

P.S.- ALSO, THIS WORKS as well- with your .gif layers loaded make or load your bg image. Okay now 'Merge' just the first .gif layer to your background layer...THERE your all set!


if you, like me, cannot find any of these plug-ins, you can simply duplicate the background layer, one copy per each foreground layer, and merge foreground layers into individual copies of the background. then animate in GIMP as you would normally do. It's a manual procedure (this is where plug-ins come in handy to do the automation, I suppose), but if you only have a few foreground layers, it's doable.

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