Add unit tests for image formats and embeds template tags