I hacked together a markdown editor with previews. To allow the user to change how an image was displayed they could put space separated options in the alt text values of the syntax.
eg. 
Aside & max500px were then picked up the CSS using the images alt attribute as the selectors.