The spec says...
Note. This specification does not fully define the interaction of :before and :after with replaced elements (such as IMG in HTML). This will be defined in more detail in a future specification.
:before
:after
I guess this means they don't work with img elements (for now).
img
Also see this answer.
1.4m articles
1.4m replys
5 comments
56.9k users