Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Create an ImageTagHelper that supports globbed src paths and cache-busting file version URL hash #2249

@DamianEdwards

Description

@DamianEdwards

This is equivalent to the existing Tag Helpers for <script> and <link> but for <img> elements.

e.g.:

<!-- Globbed images, will render a separate image tag for each matched path -->
<img asp-src-include="images/thumbs/@Model.ProductId/*.jpg" alt="Some alt text" />

<!-- File version/fingerprint, will add a file version to the URL to aid in cache busting  -->
<img src="~/images/site-banner.png" alt="Site banner" asp-file-version="true" />

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions