Blazor Images

Documentation and examples for opting images into responsive behavior (so they never become wider than their parent) and add lightweight styles to them.

Example#

By default images are responsive. The default value of the IsResponsive parameter is true.
placeholder
Razor
<Image Src="/images/placeholder.png" Alt="placeholder" />

Image thumbnails#

To set the image to have a rounded 1px border appearance, set the IsThumbnail parameter to true.
placeholder
Razor
<Image Src="/images/placeholder.png" IsThumbnail="true" Alt="placeholder" />

Aligning images#

placeholder1 placeholder2
Razor
<Image Src="/images/placeholder.png" Class="rounded float-start" Alt="placeholder1" />
<Image Src="/images/placeholder.png" Class="rounded float-end" Alt="placeholder2" />
placeholder
Razor
<Image Src="/images/placeholder.png" Class="rounded mx-auto d-block" Alt="placeholder" />
placeholder
Razor
<div class="text-center">
    <Image Src="/images/placeholder.png" Class="rounded" Alt="placeholder" />
</div>