[tex4ht] How to make tex4ht process .png files with scale option for \includegraphics?

Nasser M. Abbasi nma at 12000.org
Fri Mar 22 09:01:22 CET 2013

Is there a way to make tex4ht use .png files and not having
to covert all the images to .eps?

I am trying to build large latex document with hundreds of
lines like this:


Before I was using Latex2html and now trying to build it with tex4ht.

I know tex4html is latex based and not pdflatex, so images
are supposed to be in eps only?

I tried once to convert images from png to eps using the convert
command on Linux and the final image quality became much worst.

Is there a way to have tex4ht process these .png images as is?

The message I get is

"TeX4ht warning --- Cannot determine size of graphic in"

Then when I look at the HTML page, all what I see are the words



in place of where the image is supposed to be.
The command I use is

htlatex foo.tex "my.cfg,htm,pic-align"

and my.cfg  is

\Configure{PicMath}{}{}{}{ class="math" align="absmiddle"}
\Css {
    BODY {font-family: Verdana, Helvetica, Arial,   sans-serif ; font-size:0.9em;}

Using (TeX Live 2012/Debian)


More information about the tex4ht mailing list