@Tag.Picture()
picture
img
@Tag.Picture( Tag.Source().Srcset(path + large).Media("(min-width: 800px)"), Tag.Img().Src(path + small) )
<picture><source srcset='/Portals/0/2sxc/Tutorial-Razor/blade/assets/tag-img/%C3%BCberschrift-large.png' media='(min-width: 800px)'><img src='/Portals/0/2sxc/Tutorial-Razor/blade/assets/tag-img/%C3%BCberschrift-small.png'></picture>
<pre>@Tag.Picture( Tag.Source().Srcset(path + large).Media("(min-width: 800px)"), Tag.Img().Src(path + small) ).ToString()</pre>
Below you'll see the source code of the file. Note that we're just showing the main part, and hiding some parts of the file which are not relevant for understanding the essentials. Click to expand the code
@inherits Custom.Hybrid.Razor14 @using ToSic.Razor.Blade; <!-- unimportant stuff, hidden --> RazorBlade Fluent Tag API... <!-- unimportant stuff, hidden --> <hr> @{ var path = App.Path + "/blade/assets/tag-img/"; var small = "überschrift-small.png"; var large = "überschrift-large.png"; } @Tag.Picture( Tag.Source().Srcset(path + large).Media("(min-width: 800px)"), Tag.Img().Src(path + small) ) <!-- unimportant stuff, hidden -->