I have the following liquid markup:
{{ 'image.jpg' | theme_image_tag }}
and it renders like,
<img src="/site.com/site/3424242/image.jpg" />
How to add a class or whatever option to it? I want it to render like:
<img src="/site.com/site/3424242/image.jpg" class="thumbnail" />
I use the Locomotive CMS and the liquid that comes with it.
image_tag
and similar filters generating a tag that has a/
before the>
(not required in HTML 5) and a space before the/
(not required except for compatibility with Netscape 4 and older browsers); at least the latter of these points feels like an implementation detail in Liquid that the devs would think little of changing in future. I'd worry that relying on this could be fragile. – Sorce