Repository navigation
FAQ
No. IsImageUrlAsync sends a GET, reads the status and headers, and disposes of the response without reading the body. HasImageExtension sends nothing. Neither checks that the bytes are an image (Edge cases and errors).
IsImageUrlAsync takes absolute http and https URLs only, and answers false for anything else before looking at the extension. HasImageExtension also reads relative paths. Use HasImageExtension for file names (How URLs are checked).
No. F# reads the old module's F# signature and ignores its C# extension attributes:
#r "nuget: IsImageUrlDotNet, 2.0.0"
open IsImageUrlDotNet
printfn "%b" ("image.png".IsImageUrl())fails with:
fs-old-extension.fsx(4,27): error FS0039: The type 'String' does not define a field, constructor, or member named 'IsImageUrl'. Maybe you want one of the following:
IsImageUrlAsync
Write IsImageUrlDotNetLib.IsImageUrl url, or better, use the new methods, which F# can call in either form (Getting started).
default fits both the CancellationToken and the HttpClient overloads, so C# reports CS0121. Pass CancellationToken.None, a token or a client (API reference).
The shared client uses the process's default proxy. On .NET 10 and .NET 8 that includes the HTTP_PROXY and HTTPS_PROXY environment variables, which .NET Framework ignores; there, WebRequest.DefaultWebProxy applies. Every online example on this wiki reached its local stand-in that way. On .NET 10, .NET 8 and in F# scripts it went through the variables. On .NET Framework, WebRequest.DefaultWebProxy was set before the example ran. For another proxy, pass your own client.
The shared client sends IsImageUrlDotNet/2.0 (+https://github.com/m4bwav/IsImageUrlDotNet). Your own client sends its own headers and none from the package (Recipes).
Yes. The concurrent recipe runs three calls at once on the shared client.
With the shared client, up to 10 seconds for each request, and a check that follows redirects sends up to 11 requests. Pass a token for a shorter deadline (recipe).
Not on its own: it requests loopback and private addresses and follows redirects to other hosts. Pass a client whose handler refuses those addresses and has AllowAutoRedirect = false, and never use the obsolete IsImageUrl for such input (Edge cases and errors).
The package has a net462 build, and that build ran here on .NET Framework 4.8 with the same answers as .NET 10. .NET Framework 4.6.2 to 4.7.2 themselves were not tested.
No. IsImageUrl still builds and gives 1.0.2's answers; the warning says it is obsolete. Versions and upgrading shows which answers change when you move to the new methods.
This wiki describes IsImageUrlDotNet 2.0.0 and was last updated on 2026-09-29. The library is MIT licensed. Report problems in the issues. On NuGet: IsImageUrlDotNet.
Using it
The releases
Contributing
Elsewhere