The syntax for embedded images in MediaWiki currently supports quite a few attributes, including CSS class, such as [[File:Example.png|class=...]].
However, it doesn't support CSS inline styles, like [[File:Example.png|style=...]].
We support inline styles for tables, and for divs and spans; as a user I would expect to be able to define styles wherever I can define a class.