I use a command like this to generate HTML files and save them in the directory ./html.
make4ht -x -f html5 -d html doc1.tex
So, for example, this document
\documentclass{article}
\usepackage{graphicx}
\begin{document}
This is a test.
\includegraphics{../Figures/image.png}
\end{document}
when converted with the command above produces the file ./html/doc1.html with contents as follows:
<!DOCTYPE html>
<html lang='en-US' xml:lang='en-US'>
<head><title></title>
<meta charset='utf-8' />
<meta content='TeX4ht (https://tug.org/tex4ht/)' name='generator' />
<meta content='width=device-width,initial-scale=1' name='viewport' />
<link href='doc1.css' rel='stylesheet' type='text/css' />
<meta content='doc1.tex' name='src' />
</head><body>
<!-- l. 4 --><p class='noindent'>This is a test. <img alt='PIC' src='../Figures/image.png' />
</p>
</body>
</html>
What I'd like is for the img tag in the HTML file to point to the file image.png in the local directory i.e. ./html, and to have the graphics file copied to ./html/image.png. This would allow me to zip up the ./html directory and share it without having to worry about missing graphics files. Is this possible, and if so, how? I am using Linux (Ubuntu).
../Figuresdirectory for the files in the .tex file? With\graphicspathor directly in\includegraphics, and are you using absolute or relative paths? Some sample code might help. This might be possible with supplying options fort4ht, and even if it's not possible throughmake4ht, it's almost certainly possible with a farily simple script. To be clear you don't want to copy the Figures directory to a subdirectory ofhtml/but want the image files directly inhtml/itself? And what OS? – frabjous Sep 07 '22 at 17:27