- Signed URLs
- Srcset Generation
- What is the ixlib param on every request?
- Code of Conduct
The latest version of the library can be installed via NuGet:
Or you can clone this repository and build it.
v1.x of the library can be installed via NuGet:
You can start creating imgix URLs programmatically through
UrlBuilder instances. The URL builder can be reused to create URLs for any images on the domains it is provided.
To produce a signed URL, you must enable secure URLs on your source and then provide your signature key to the URL builder.
The imgix-csharp library allows for generation of custom
srcset attributes, which can be invoked through
BuildSrcSet(). By default, the
srcset generated will allow for responsive size switching by building a list of image-width mappings.
Will produce the following attribute value, which can then be served to the client:
In cases where enough information is provided about an image's dimensions,
BuildSrcSet() will instead build a
srcset that will allow for an image to be served at different resolutions. The parameters taken into consideration when determining if an image is fixed-width are
h (height), and
ar (aspect ratio). By invoking
BuildSrcSet() with either a width or the height and aspect ratio (along with
fit=crop, typically) provided, a different
srcset will be generated for a fixed-size image instead.
Will produce the following attribute value:
For more information to better understand
srcset, we highly recommend Eric Portis' "Srcset and sizes" article which goes into depth about the subject.
What is the
ixlib param on every request?
For security and diagnostic purposes, we sign all requests with the language and version of library used to generate the URL.
This can be disabled by passing
false for the
includeLibraryParam option to
Code of Conduct
Users contributing to or participating in the development of this project are subject to the terms of imgix's Code of Conduct.
More Core Libraries
- imgix-elixirbuildAn Elixir client library for generating image URLs with imgixElixir 29 a month ago
- imgix-gobuildA Go client library for generating image URLs with imgixGo 2 2 months ago
- imgix-javabuildA Java client library for generating URLs with imgixJava 13 3 months ago
- imgix-phpbuildA PHP client library for generating URLs with imgixPHP 90 2 months ago
- imgix-pythonbuildA Python client library for generating URLs with imgixPython 24 a month ago
- imgix-rbbuildA Ruby gem for generating image URLs with imgixRuby 63 2 months ago
- imgix-swiftbuildA Swift client library for generating URLs with imgixSwift 19 14 days ago