Images & figures
Render responsive images, thumbnails, rounded images, alignment helpers, and figure captions.
Responsive images
Set fluid to apply Bootstrap's responsive image sizing, which constrains the image to the parent width while keeping its height automatic. Use HTML width and height attributes when intrinsic dimensions are useful for layout stability.
<bs-img src="/images/XmlLogGen.png" alt="Responsive example" fluid="true" rounded="true" width="640" height="360" loading="lazy" />
Image thumbnails
Set thumbnail for Bootstrap's bordered thumbnail treatment. Thumbnail and rounded image attributes compose normally with declarative float, margin, and sizing attributes.
Use image helper attributes for float, margin, and sizing behavior.
<bs-div clearfix="true">
<bs-img src="/images/Icon-Generator.png" alt="Thumbnail example" thumbnail="true" float="Start" end-margin="Default3" bs-width="Relative25" />
<bs-p>Use image helper attributes for float, margin, and sizing behavior.</bs-p>
</bs-div>
Aligning images
Use float, margin, and display attributes for Bootstrap's documented alignment patterns. Keep the alt text meaningful unless the image is purely decorative.
Floated images use declarative utility attributes, while the image helper owns the image element and common image attributes.
<bs-div clearfix="true">
<bs-img src="/images/Icon-Generator.png" alt="Left aligned example" rounded="true" float="Start" end-margin="Default3" bs-width="Relative25" />
<bs-img src="/images/Icon-Generator.png" alt="Right aligned example" rounded="true" float="End" start-margin="Default3" bs-width="Relative25" />
<bs-p>Floated images use declarative utility attributes, while the image helper owns the image element and common image attributes.</bs-p>
</bs-div>
Centered image
Use display and margin attributes for the centered image pattern from Bootstrap's image docs.
<bs-img src="/images/Icon-Generator.png" alt="Centered example" rounded="true" display="Block" x-margin="AutoOrDefault" bs-width="Relative25" />
Figures
Use bs-figure and bs-figure-caption for the semantic figure pattern.
bs-img.
<bs-figure>
<bs-img src="/images/XmlLogGen.png" alt="Example figure" fluid="true" rounded="true" figure-image="true" />
<bs-figure-caption>A local image rendered through <code>bs-img</code>.</bs-figure-caption>
</bs-figure>
Picture
Use bs-picture with bs-source for art direction or multiple image sources, and keep bs-img for the fallback image required by the browser.
<bs-picture>
<bs-source srcset="/images/XmlLogGen.png" media="(min-width: 768px)" type="image/png" />
<bs-img src="/images/Icon-Generator.png" alt="Picture fallback example" fluid="true" rounded="true" loading="lazy" />
</bs-picture>