I have found this question very helpful in my configuration of images. Inspired by tex4ht's capabilities (it's so much more powerful than I thought!) I'm wondering if I could have image width configured in em units instead of pt units.
Here are examples of my tex and cfg files:
mwe.tex:
\documentclass{article}
\usepackage[]{graphicx}
\usepackage[]{amsmath}
\begin{document}
EPS file (0.3 textwidth)
\begin{center}
\includegraphics[width=0.3\textwidth]{plot.eps}
\end{center}
PNG file: (0.5 textwidth)
\begin{center}
\includegraphics[width=0.5\textwidth]{plot.png}
\end{center}
\end{document}
my_mwe.cfg:
\Preamble{html}
\Configure{graphics*}
{eps}
{%
\Picture[pict]{\csname Gin@base\endcsname\PictExt
\space width="\the\dimexpr \expandafter\the\csname Gin@req@width\endcsname *3/2"
}%
}
\Configure{graphics*}
{png}
{%
\Picture[pict]{\csname Gin@base\endcsname .png
\space width="\the\dimexpr \expandafter\the\csname Gin@req@width\endcsname *3/2"
}%
}
\begin{document}
\EndPreamble
Running
htlatex mwe.tex "my_mwe.cfg"
produces images with widths of 155pt and 258pt, respectively, which look great in my pc browser but not a tablet or phone browser: I'd much rather have the width in em units or percentage. (As a follow up to a comment on the linked question, I found that "...\endcsname *1.5" did not work, but "...\endcsname *3/2" does.)
Being originally drawn to tex4ht in order to produce both html and pdf documents, I'd like to be able to take advantage of the responsiveness of html.
Is there hope that this is configurable? Thanks.

\includegraphics[scale=0.7]{d1.png}and it seems to have took the 0.7 above as the width, so the resulting image in HTML was very small, with"width:4.21573em;"I did not really want this solution to affectscalesince I have not yet changed all my documents to usewidthand now all my images are coming up very small in HTML. Another issue that should be mentioned in the solution above, is that this works for 12pt only due to the extra decimal point (per our chat). Thank you. – Nasser Aug 12 '14 at 23:27\includegraphics[width=0.7\paperwidth]{d1.png}but when using\includegraphics[scale=0.7]{d1.png}then it should leave this alone and not apply the 0.7 above as the width. For some reason this causes the image to come out too small in HTML. (btw, this solution is really useful and should be actually integrated in Tex4ht itself.) – Nasser Aug 12 '14 at 23:37dvimode, which is modetex4htuses. You can generate bouding box info file withebb imagenamecommand and use\usepackage[dvipdfm]{graphicx}for using this info file – michal.h21 Aug 13 '14 at 12:33