[tex4ht] How to \includegraphics using absolute path with tex4ht?

Michal Hoftich michal.h21 at gmail.com
Mon Jun 19 13:37:57 CEST 2023

Hi Nasser,

> <img alt='pict' src='/mnt/g/public_html/images/image.svg' ' />
> And it can't find it of course. I compile on Linux, view on windows. And on
> the server this path makes no sense.  Even if I use
>      src='/images/image.svg'
> i.e. relative to public_html/, it still does not see it on windows.
> How can one then use absolute path for an image when compiling to HTML?

TeX4ht doesn't change image paths by default, so you get absolute
paths by default. You can use a solution from this answer to copy
them: https://tex.stackexchange.com/a/656511/2891

If it works for you, I can add it to make4ht as a new extension, so it
could be then enabled from the command line.

Best regards,

More information about the tex4ht mailing list.