If you see this, something is wrong
First published on Saturday, Aug 16, 2025 and last modified on Thursday, May 28, 2026 by François Chaplais.
Besides ordinary running text, you can also insert media in your document flow. This lesson details what type of media can be used in your document, and how to upload media files.
Images are inserted in a document by using the \includegraphics command.
PDF images are not handled natively in HTML 5, which means, in practice, that PDF illustrations cannot be inserted into the flow of a web page. The same applies to EPS files.
The only supported vector file format in HTML 5 is SVG. Here is a sample SVG illustration.
LaTeX2Web supports the following file formats:
Animated GIFs also work. Here is a JPG photo (which has been compressed before upload).
And an animated GIF.
The previous images are all embeded in a figure object, which has many nice properties and can have a caption. Figures can be expanded to fill the browser windown by clicking on the icon. Here is the structure of the code.
\begin{figure}
\includegraphics{path or url of the image}
\caption{the figure caption}
\end{figure}
You can place multiple images in a grid. To do so, simply use several \includegraphics commands in the body of the figure environment.
To obtain something more elaborate, you can use the subfigure environment several times inside the figure. Let us have a look at the code.
\begin{figure}
\caption{Observe how the grid behaves when resizing the browser window.}
\begin{subfigure}
\includegraphics{4600_8-02.svg}
\caption{A cute space cat}
\end{subfigure}
\begin{subfigure}
\includegraphics{cute-cat-with-blue-eyes-2024-10-14-17-06-59-utc.jpg}
\caption{Cuteness overload}
\end{subfigure}
\begin{subfigure}
\includegraphics{mlvseq9yvZhba.gif}
\caption{Not ALL cats are cute}
\end{subfigure}
\end{figure}Here is the result.
Image can be used as links. This image leads to the Documents Live home page.
Here is the code.
\begin{imageLink}
\url{https://documents.live/}
\imageUrl{house.jpg}
\alt{link to LaTeX2Web home page}
\caption{Click on this image to go to the Documents Live home page}
\end{imageLink}LaTeX2Web supports four kinds of video:
Here is an example with the following code.
\begin{video}
\theme{red, 24}
\url{a1r1sgxcBJI902avWpkNUGVdv2ukUfNtZ6ndsmEsX8Ug}
\type{mux}
\end{video}And here is the result.
Video 1
If specified, a theme can be applied to the viseo player. For backward compatibility, you can specify one of the four keyword as a argument for the command: city, fantasy, forest and sea.
In general, the argument for the \theme command should a comma separated list of two values: a standard HTML color , and a valid CSS size. For instance, the following YouTube video uses the following command
\theme{red, 24}This means that the theme color will be set to red, and the controls will be sized at a value of 24px.
Here is the YouTube example.
Video 2. A YouTube video featuring the LaTeX2Web Inline Editor
Here is the code.
\begin{video}
\theme{red, 24}
\url{https://youtu.be/ElDRYDgSUO0?si=5uVw525mx99F3p3k}
\type{youtube}
\caption{A YouTube video featuring the LaTeX2Web Inline Editor}
\end{video}You can also add an interactive transcript of the video! When you click somewhere in the transcript, the video is brought to the corresponding segment.
For more details on video in LaTeX2Web, see the online help .
If you have a subtitle file (.srt format), related to a video, you can add an interactive transcript to videos. Here is an example. To see it in action, follow these steps.
This will bring immediately the video to the text that you have clicked.
A video with an interactive transcript
Here is the code.
\begin{video}
\url{022SoBc1wsvTvyIms6ofTTJKuSl1z3kmkyoQTCvPX00i8}
\type{mux}
\srt{Create a document from scratch.srt}
\caption{A video with an interactive transcript}
\end{video}
The .srt subtitle file is uploaded via the general upload media mechanism.
Audio in the mp3 format is supported. Here is an example.
Sample audio
Here is the code.
\begin{audio}
\url{path or url of the audio}
\end{audio}In general, it is simpler to host your media along your document. You may already have media available if you have uploaded an existing LaTeX project. You can upload media files to your project at any type.
To do so, go to your dashboard and, from the action menu, select “Upload media”. You are then re-directed to an upload page. You can either upload single media files or a zip archive of such files.
To see (notably) the list of media files for a document, select “Get media info” in the action menu.
Summary 1
In LaTeX2Web, media can be of type image, video or audio. Images in the PDF or EPS formats are not supported.
Images and videos can be expanded, and multiple images can be displayed in a grid.