This is what I do. Here is an template example
\documentclass[12pt,notitlepage]{article} \usepackage{graphicx} \begin{document} \includegraphics[scale=0.4]{img} \end{document}
I have img.png to start with, since most apps I use can generate .png images. But since htlatex wants .eps, I convert the png to eps like this
convert img.png eps3:img.eps
Make sure to use level3 eps to reduce the size. Note, no space between eps3: and the target file name next to it. Have to use eps for htlatex, else it will not scale the png file. htlatex can read png files, but png files have no bounding boxes, so can’t change the size if needed as in the above example.
What if you do not have png image as the original? and only have eps? Then now pdflatex is not happy and htlatex is happy. Ok, no problem, use this package as below. So this solution below will work for all conditions
\documentclass[12pt,notitlepage]{article} \usepackage{epstopdf}% \epstopdfsetup{update} \usepackage{graphicx} \begin{document} \includegraphics[scale=0.4]{img} \end{document}
So what will happen now, is if the file was img.eps, then pdflatex will convert it to pdf automatically and use the img.pdf file for the graphics. htlatex see the eps file and is happy.
So rule of thumb: If it was img.png, convert to eps first to make htlatex happy. If it was .eps, then include the above packages to make pdflatex happy. And always leave the extension off the image name in the latex file as above.
It will be better to generate .eps image to start with from the app which created the images if possible, so do not have to remember to convert them each time to eps, But if not, do the above.