Frequently Used Methods
Frequently Used Methods
Frequently Used Methods
Frequently Used Methods
public static string ImgSrcToWebP(this HttpRequest httpRequest, string src, bool?acceptWebP = null) { acceptWebP ??= httpRequest.AcceptWebP(); if (acceptWebP.Value) { return(string.Concat(src.AsSpan(0, src.LastIndexOf(".", StringComparison.Ordinal)), ".webp")); } return(src); }