I am creating a very simple tag that should do the same thing as the image tag, but add some markup around the output. Is there a way I could call the image tag itself from within my tag?
You have to specify the attributes of the image tag as attributes of the consuming tag, though. Otherwise they are ignored by the parser and therefore don’t reach the image tag function. In this case, I only need alt and class, so I added only those.
Nope, it works. The tag is intended for usage inside a <div class="col-md-7"></div> element. So what this tag does is it terminates that opening tag, inserts the image with a larger col number, and reopens the tag. Basically, I want to have 7-columns content, 12-columns image and then 7-columns content again.