# How do I include a local GIF image into beamer using media9 package

TeX - LaTeX Asked by Huy Nguyen on December 15, 2020

From this question, there is a way to include images with a hyperlink using the media9 package included in TeXLive. I am trying to include a GIF image (supported directly by the media9 package) in a beamer slide:

    begin{frame}
frametitle{Motivation from photography}
includemedia[
width=0.3linewidth,keepaspectratio,
activate=onclick,
%flashvars={xml=config.xml},
%passcontext %show the player’s context menu
]{}{StrobeMediaPlayback.swf}
end{frame}


I still have some trouble: my tex file compiled successfully but when I opened the pdf file (adobe reader; Foxit doesn’t show the gif image) and clicked on the window, it showed the following error: “we are unable to connect to the content you’ve requested. We apologize for the inconvenience” (TypeError – Error#1009). Some background: I compiled with pdflatex-biber-pdflatex-pdflatex sequence. I called the media9 package by

usepackage{media9}


I've been trying to use GIF images with media9 as well without success. In the end, I was able to include the animation using an MP4 video instead. Turning a GIF into an MP4 is easy, you can use kdenlive for this. Once you have the MP4 file, you can include the animation as follows:

begin{frame}
includemedia[
width=.3linewidth,
height=.3linewidth,
transparent,
activate=pageopen,
passcontext,
flashvars={
source=../../../../Documents/Horse_galloping.gif
&loop=true
}
]{}{VPlayer.swf}
end{frame}


Not the best solution, but it works. On the bright side, the MP4 file uses less space than the actual GIF, which is a plus.

Answered by gvegayon on December 15, 2020

## Related Questions

2  Asked on November 9, 2021

### How do you check whether an author list consists of only one or multiple authors in a custom driver in BibLaTeX?

1  Asked on November 9, 2021 by palpatimo

### Using the same .bib file for appendix

0  Asked on November 9, 2021

### TikZ nested text boxes margins

4  Asked on November 9, 2021

### Using def inside mathematical environment

1  Asked on November 9, 2021

### Center two images with different heights/widths vertically aligned by the center with captions at the bottom

2  Asked on November 9, 2021

### Aligning Equation with cases

2  Asked on November 9, 2021

### How to properly use chappg and glossaries together

0  Asked on November 9, 2021

### How do I make greek uppercase latters upright/roman again?

0  Asked on November 9, 2021

### Draw a figure with text in Tikz

1  Asked on November 6, 2021 by oldenios

### Problems creating PDFs for professional print

1  Asked on November 6, 2021 by olsn

### Koma-Script scrartcl.cls + newfile.sty: readstream stops after section+newline in file

1  Asked on November 6, 2021 by zoltn

### pgfplots Error when trying to read a copy of a .csv file that works if not renamed

0  Asked on November 6, 2021 by barefoot_fiki

### How to create these plots?

3  Asked on November 6, 2021 by kileuskas

### PGFPlots surface plot from table with one column for each y value

0  Asked on November 6, 2021 by crazymoomin

### f(x)=exp(-x^2/2)(x^2-1) using PGFPlots

1  Asked on November 6, 2021

### Drawing a sphere and an ellipsoid in the same picture in TiKz

1  Asked on November 6, 2021 by rowcol

### ! Missing number, treated as zero., ! Undefined control sequence., ! File ended while scanning use of [email protected]@@. LaTex

1  Asked on November 6, 2021 by bibianne-castaeda

### Incorrect bar graph formatting in TeX

1  Asked on November 6, 2021 by egor-stoyan

### Title Page Alignment and Transparenting Paragraph and Lines in Beamer

1  Asked on November 6, 2021