It is sort of possible via the MathJAX extension
HTML
using commands of the form style{css}{math}
.
Basically, this style command will attach some extra CSS style
attributes to the math elements and let the browser render them.
However, how are they rendered depend on browser and even for a single browser,
it takes a lot tweaking to make it looks right
(following looks decent under Firefox 28).
I post this as an answer just to document what is possible.
$\require{HTML}
\newcommand{\mypic}[4][]{
\style{
display: inline-block;
background: url(http://i.stack.imgur.com/#4) no-repeat center;
#1
}{\phantom{\Rule{#2}{#3}{0px}}}}$
$$\begin{array}{cc}
\mypic[border-radius:8px;box-shadow: 4px 4px 8px rgb(0,0,127) inset;]{112px}{112px}{4uXag.jpg}&
\mypic[border-radius:8px;box-shadow: 4px 4px 8px black;padding:12px]{100px}{100px}{pqHxu.jpg?s=128}\\
\mypic{128px}{128px}{3V779.jpg}&
\mypic{128px}{128px}{9Hh6X.jpg}
\end{array}$$
Code implement above behavior follows
$\require{HTML}
\newcommand{\mypic}[4][]{
\style{
display: inline-block;
background: url(http://i.stack.imgur.com/#4) no-repeat center;
#1
}{\phantom{\Rule{#2}{#3}{0px}}}}$
$$\begin{array}{cc}
\mypic[border-radius:8px;box-shadow: 4px 4px 8px rgb(0,0,127) inset;]{112px}{112px}{4uXag.jpg}&
\mypic[border-radius:8px;box-shadow: 4px 4px 8px black;padding:12px]{100px}{100px}{pqHxu.jpg?s=128}\\
\mypic{128px}{128px}{3V779.jpg}&
\mypic{128px}{128px}{9Hh6X.jpg}
\end{array}$$
![1][1]
instead of[1]
in the array, it still would not have worked. $\endgroup$