24

New to this tagging language, and I'm having trouble finding documentation mentioning how to work with images. An example or two would be fantastic.

Btw, I did refer to this discussion, but not sure if that's what I need.

Community
  • 1
  • 1
stanigator
  • 10,768
  • 34
  • 94
  • 129

1 Answers1

67

Outside any kind of framework:

%img(src="/images/loading.gif")

The older, more verbose but flexible syntax:

%img{:src => "/images/loading.gif"}

If you’re using Rails, it will generate the tag itself:

=image_tag "loading.gif"
Buck Doyle
  • 6,333
  • 1
  • 22
  • 35