{"id":18708663,"url":"https://github.com/imgix/js-core","last_synced_at":"2026-04-05T17:38:22.079Z","repository":{"id":33176016,"uuid":"36817173","full_name":"imgix/js-core","owner":"imgix","description":"A JavaScript client library for generating image URLs with imgix","archived":false,"fork":false,"pushed_at":"2024-10-07T13:51:52.000Z","size":1774,"stargazers_count":122,"open_issues_count":11,"forks_count":21,"subscribers_count":14,"default_branch":"main","last_synced_at":"2024-10-10T14:37:00.594Z","etag":null,"topics":["commonjs","core-js","hacktoberfest","images","imgix","javascript","npm","signing-imgix-urls","src","srcset","urlbuilder"],"latest_commit_sha":null,"homepage":"https://www.imgix.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imgix.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE-OF-CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-06-03T16:47:30.000Z","updated_at":"2024-09-15T18:23:08.000Z","dependencies_parsed_at":"2023-09-29T01:40:33.432Z","dependency_job_id":"53786a3b-ecb5-4347-80dd-eb3dd2b471f4","html_url":"https://github.com/imgix/js-core","commit_stats":{"total_commits":566,"total_committers":27,"mean_commits":"20.962962962962962","dds":0.6731448763250883,"last_synced_commit":"df427294f6a9977d5bf51f4732223a390a7f2cb7"},"previous_names":["imgix/imgix-core-js"],"tags_count":58,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgix%2Fjs-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgix%2Fjs-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgix%2Fjs-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgix%2Fjs-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imgix","download_url":"https://codeload.github.com/imgix/js-core/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247730069,"owners_count":20986404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["commonjs","core-js","hacktoberfest","images","imgix","javascript","npm","signing-imgix-urls","src","srcset","urlbuilder"],"created_at":"2024-11-07T12:24:29.524Z","updated_at":"2025-12-12T04:09:29.697Z","avatar_url":"https://github.com/imgix.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- ix-docs-ignore --\u003e\n\n![imgix logo](https://assets.imgix.net/sdk-imgix-logo.svg)\n\n`@imgix/js-core` is a JavaScript library for generating image URLs with [imgix](https://www.imgix.com/) that can be used in browser or server-side settings.\n\n[![NPM Version](https://img.shields.io/npm/v/imgix-core-js.svg)](https://www.npmjs.com/package/@imgix/js-core)\n[![Build Status](https://circleci.com/gh/imgix/js-core.svg?style=shield)](https://circleci.com/gh/imgix/js-core)\n[![Monthly Downloads](https://img.shields.io/npm/dm/imgix-core-js.svg)](https://www.npmjs.com/package/@imgix/js-core)\n[![Minified Size](https://img.shields.io/bundlephobia/min/imgix-core-js)](https://bundlephobia.com/result?p=imgix-core-js)\n[![License](https://img.shields.io/github/license/imgix/js-core)](https://github.com/imgix/js-core/blob/main/LICENSE.md)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fimgix%2Fimgix-core-js.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fimgix%2Fimgix-core-js?ref=badge_shield)\n\n---\n\n\u003c!-- /ix-docs-ignore --\u003e\n\n\u003c!-- NB: Run `npx markdown-toc README.md --maxdepth 4 | sed -e 's/[[:space:]]\\{2\\}/    /g' | pbcopy` to generate TOC :) --\u003e\n\n\u003c!-- prettier-ignore-start --\u003e\n\n- [Installing](#installing)\n- [Usage](#usage)\n    * [CommonJS](#commonjs)\n    * [ES6 Modules](#es6-modules)\n    * [In-browser](#in-browser)\n- [Configuration](#configuration)\n- [API](#api)\n    * [`ImgixClient.buildURL(path, params, options)`](#imgixclientbuildurlpath-params-options)\n    * [`ImgixClient.buildSrcSet(path, params, options)`](#imgixclientbuildsrcsetpath-params-options)\n        + [Fixed Image Rendering](#fixed-image-rendering)\n        + [Custom Widths](#custom-widths)\n        + [Width Tolerance](#width-tolerance)\n        + [Minimum and Maximum Width Ranges](#minimum-and-maximum-width-ranges)\n        + [Variable Qualities](#variable-qualities)\n        + [Disable Path Encoding](#disable-path-encoding)\n    * [Web Proxy Sources](#web-proxy-sources)\n- [What is the `Ixlib` Param on Every Request?](#what-is-the-ixlib-param-on-every-request)\n- [Support for Management API](#support-for-management-api)\n- [Testing](#testing)\n- [License](#license)\n\n\u003c!-- prettier-ignore-end --\u003e\n\n## Installing\n\n@imgix/js-core can be installed via npm:\n\n```bash\nnpm install @imgix/js-core\n```\n\n## Usage\n\nDepending on your module system, using @imgix/js-core is done a few different ways. The most common entry point will be the `ImgixClient` class. Whenever you provide data to `ImgixClient`, make sure it is not already URL-encoded, as the library handles proper encoding internally.\n\n### CommonJS\n\n```js\nconst ImgixClient = require('@imgix/js-core');\n\nconst client = new ImgixClient({\n  domain: 'testing.imgix.net',\n  secureURLToken: '\u003cSECURE TOKEN\u003e',\n});\n\nconst url = client.buildURL('/path/to/image.png', {\n  w: 400,\n  h: 300,\n});\n\nconsole.log(url); // =\u003e \"https://testing.imgix.net/users/1.png?w=400\u0026h=300\u0026s=…\"\n```\n\n### ES6 Modules\n\n```js\nimport ImgixClient from '@imgix/js-core';\n\nconst client = new ImgixClient({\n  domain: 'testing.imgix.net',\n  secureURLToken: '\u003cSECURE TOKEN\u003e',\n});\n\nconst url = client.buildURL('/path/to/image.png', { w: 400, h: 300 });\nconsole.log(url); // =\u003e 'https://testing.imgix.net/users/1.png?w=400\u0026h=300\u0026s=…'\n```\n\n### In-browser\n\n```js\nvar client = new ImgixClient({\n  domain: 'testing.imgix.net',\n  // Do not use signed URLs with `secureURLToken` on the client side,\n  // as this would leak your token to the world. Signed URLs should\n  // be generated on the server.\n});\n\nvar url = client.buildURL('/path/to/image.png', { w: 400, h: 300 });\nconsole.log(url); // =\u003e \"https://testing.imgix.net/users/1.png?w=400\u0026h=300\"\n```\n\n## Configuration\n\nThe following options can be used when creating an instance of `ImgixClient`:\n\n- **`domain`:** String, required. The imgix domain that will be used when constructing URLs. Defaults to `null`.\n- **`useHTTPS`:** Boolean. Specifies whether constructed URLs should use the HTTPS protocol. Defaults to `true`.\n- **`includeLibraryParam`:** Boolean. Specifies whether the constructed URLs will include an [`ixlib` parameter](#what-is-the-ixlib-param-on-every-request). Defaults to `true`.\n- **`secureURLToken`:** String. When specified, this token will be used to sign images. Read more about securing images [on the imgix Docs site](https://docs.imgix.com/setup/securing-images). Defaults to `null`.\n  - :warning: *The `secureURLToken` option should only be used in server-side applications to prevent exposing your secure token.* :warning:\n\n\n## API\n\n### `ImgixClient.buildURL(path, params, options)`\n\n- **`path`:** String, required. A full, unencoded path to the image. This includes any additional directory information required to [locate the image](https://docs.imgix.com/setup/serving-images) within a source.\n- **`params`:** Object. Any number of imgix rendering API [parameters](https://docs.imgix.com/apis/url).\n- **`options`:** Object. Any number of modifiers, described below:\n  - [**`disablePathEncoding`**](#disable-path-encoding): Boolean. Disables encoding logic applied to the image path.\n  - [**`encoder`**](#encoder): Function. Applies custom logic to encode the image path and query parameters.\n\nConstruct a single image URL by passing in the image `path` and any rendering API parameters.\n\n```js\nconst client = new ImgixClient({\n  domain: 'testing.imgix.net',\n});\n\nconst url = client.buildURL('folder/image.jpg', {\n  w: 1000,\n});\n```\n\n**Returns**: an image URL as a string.\n\n```html\nhttps://testing.imgix.net/folder/image.jpg?w=1000\u0026ixlib=js-...\n```\n\n### `ImgixClient.buildSrcSet(path, params, options)`\n\n\u003c!-- prettier-ignore-start --\u003e\n\n- **`path`:** String, required. A full, unencoded path to the image. This includes any additional directory information required to [locate the image](https://docs.imgix.com/setup/serving-images) within a source.\n- **`params`:** Object. Any number of imgix rendering API [parameters](https://docs.imgix.com/apis/url).\n- **`options`:** Object. Any number of srcset modifiers, described below:\n  - [**`widths`**](#custom-widths)\n  - [**`widthTolerance`**](#width-tolerance)\n  - [**`minWidth`**](#minimum-and-maximum-width-ranges)\n  - [**`maxWidth`**](#minimum-and-maximum-width-ranges)\n  - [**`disableVariableQuality`**](#variable-qualities)\n  - [**`devicePixelRatios`**](#fixed-image-rendering)\n  - [**`variableQualities`**](#variable-qualities)\n  - [**`disablePathEncoding`**](#disable-path-encoding)\n\n\u003c!-- prettier-ignore-end --\u003e\n\nThe @imgix/js-core module 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.\n\n```js\nconst client = new ImgixClient({\n  domain: 'testing.imgix.net',\n  secureURLToken: 'my-token',\n});\n\nconst srcset = client.buildSrcSet('image.jpg');\n\nconsole.log(srcset);\n```\n\n**Returns**: A `srcset` attribute value as a string.\n\n\u003c!-- prettier-ignore-start --\u003e\n\n```html\nhttps://testing.imgix.net/image.jpg?w=100\u0026s=e2e581a39c917bdee50b2f8689c30893 100w,\nhttps://testing.imgix.net/image.jpg?w=116\u0026s=836e0bc15da2ad74af8130d93a0ebda6 116w,\nhttps://testing.imgix.net/image.jpg?w=134\u0026s=688416d933381acda1f57068709aab79 134w,\n                                            ...\nhttps://testing.imgix.net/image.jpg?w=7400\u0026s=91779d82a0e1ac16db04c522fa4017e5 7400w,\nhttps://testing.imgix.net/image.jpg?w=8192\u0026s=59eb881b618fed314fe30cf9e3ec7b00 8192w\n```\n\n\u003c!-- prettier-ignore-end --\u003e\n\n#### Fixed Image Rendering\n\nSpecifying either a `w` or a `h` parameter to `buildSrcSet()` will create a DPR-based srcset. This DPR-based srcset allows for the fixed-sized image to be served at different resolutions (i.e. at different pixel densities).\n\n```js\nconst client = new ImgixClient({\n  domain: 'testing.imgix.net',\n  secureURLToken: 'my-token',\n});\n\nconst srcset = client.buildSrcSet('image.jpg', {\n  h: 800,\n  ar: '3:2',\n  fit: 'crop',\n});\n\nconsole.log(srcset);\n```\n\nWill produce the following attribute value:\n\n\u003c!-- prettier-ignore-start --\u003e\n\n```html\nhttps://testing.imgix.net/image.jpg?h=800\u0026ar=3%3A2\u0026fit=crop\u0026dpr=1\u0026s=3d754a157458402fd3e26977107ade74 1x,\nhttps://testing.imgix.net/image.jpg?h=800\u0026ar=3%3A2\u0026fit=crop\u0026dpr=2\u0026s=a984ad1a81d24d9dd7d18195d5262c82 2x,\nhttps://testing.imgix.net/image.jpg?h=800\u0026ar=3%3A2\u0026fit=crop\u0026dpr=3\u0026s=8b93ab83d3f1ede4887e6826112d60d1 3x,\nhttps://testing.imgix.net/image.jpg?h=800\u0026ar=3%3A2\u0026fit=crop\u0026dpr=4\u0026s=df7b67aa0439588edbfc1c249b3965d6 4x,\nhttps://testing.imgix.net/image.jpg?h=800\u0026ar=3%3A2\u0026fit=crop\u0026dpr=5\u0026s=7c4b8adb733db37d00240da4ca65d410 5x\n```\n\n\u003c!-- prettier-ignore-end --\u003e\n\nBy default, this library generates a `srcset` with pixel density values of `1` through `5`.\nThese target ratios can be controlled by using the `devicePixelRatios` parameters.\n\n```js\nconst client = new ImgixClient({\n  domain: 'testing.imgix.net',\n  secureURLToken: 'my-token',\n});\n\nconst srcset = client.buildSrcSet(\n  'image.jpg',\n  {\n    h: 800,\n    ar: '3:2',\n    fit: 'crop',\n  },\n  {\n    devicePixelRatios: [1, 2],\n  },\n);\n\nconsole.log(srcset);\n```\n\nWill result in a smaller srcset.\n\n```html\nhttps://testing.imgix.net/image.jpg?h=800\u0026ar=3%3A2\u0026fit=crop\u0026dpr=1\u0026s=3d754a157458402fd3e26977107ade74\n1x,\nhttps://testing.imgix.net/image.jpg?h=800\u0026ar=3%3A2\u0026fit=crop\u0026dpr=2\u0026s=a984ad1a81d24d9dd7d18195d5262c82\n2x\n```\n\nFor more information to better understand `srcset`, we highly recommend [Eric Portis' \"Srcset and sizes\" article](https://ericportis.com/posts/2014/srcset-sizes/) which goes into depth about the subject.\n\n#### Custom Widths\n\nIn situations where specific widths are desired when generating `srcset` pairs, a user can specify them by passing an array of positive integers as `widths` to the third options object:\n\n```js\nconst client = new ImgixClient({\n  domain: 'testing.imgix.net',\n});\n\nconst srcset = client.buildSrcSet(\n  'image.jpg',\n  {},\n  { widths: [100, 500, 1000, 1800] },\n);\n\nconsole.log(srcset);\n```\n\nWill generate the following `srcset` of width pairs:\n\n```html\nhttps://testing.imgix.net/image.jpg?w=100 100w,\nhttps://testing.imgix.net/image.jpg?w=500 500w,\nhttps://testing.imgix.net/image.jpg?w=1000 1000w,\nhttps://testing.imgix.net/image.jpg?w=1800 1800w\n```\n\n**Note:** that in situations where a `srcset` is being rendered as a [fixed image](#fixed-image-rendering), any custom `widths` passed in will be ignored. Additionally, if both `widths` and a `widthTolerance` are passed to the `buildSrcSet` method, the custom widths list will take precedence.\n\n#### Width Tolerance\n\nThe `srcset` width tolerance dictates the maximum tolerated size difference between an image's downloaded size and its rendered size. For example: setting this value to 0.1 means that an image will not render more than 10% larger or smaller than its native size. In practice, the image URLs generated for a width-based srcset attribute will grow by twice this rate. A lower tolerance means images will render closer to their native size (thereby increasing perceived image quality), but a large srcset list will be generated and consequently users may experience lower rates of cache-hit for pre-rendered images on your site.\n\nBy default this rate is set to 8 percent, which we consider to be the ideal rate for maximizing cache hits without sacrificing visual quality. Users can specify their own width tolerance by providing a positive scalar value as `widthTolerance` to the third options object:\n\n```js\nconst client = new ImgixClient({\n  domain: 'testing.imgix.net',\n});\n\nconst srcset = client.buildSrcSet('image.jpg', {}, { widthTolerance: 0.2 });\n\nconsole.log(srcset);\n```\n\nIn this case, the `width_tolerance` is set to 20 percent, which will be reflected in the difference between subsequent widths in a srcset pair:\n\n\u003c!-- prettier-ignore-start --\u003e\n\n```html\nhttps://testing.imgix.net/image.jpg?w=100 100w,\nhttps://testing.imgix.net/image.jpg?w=140 140w,\nhttps://testing.imgix.net/image.jpg?w=196 196w,\n          ...\nhttps://testing.imgix.net/image.jpg?w=8192 8192w\n```\n\n\u003c!-- prettier-ignore-end --\u003e\n\n#### Minimum and Maximum Width Ranges\n\nIn certain circumstances, you may want to limit the minimum or maximum value of the non-fixed `srcset` generated by the `buildSrcSet()` method. To do this, you can pass in an options object as a third argument, providing positive integers as `minWidth` and/or `maxWidth` attributes:\n\n```js\nconst client = new ImgixClient({\n  domain: 'testing.imgix.net',\n});\n\nconst srcset = client.buildSrcSet(\n  'image.jpg',\n  {},\n  { minWidth: 500, maxWidth: 2000 },\n);\n\nconsole.log(srcset);\n```\n\nWill result in a smaller, more tailored srcset.\n\n```html\nhttps://testing.imgix.net/image.jpg?w=500 500w,\nhttps://testing.imgix.net/image.jpg?w=580 580w,\nhttps://testing.imgix.net/image.jpg?w=672 672w,\nhttps://testing.imgix.net/image.jpg?w=780 780w,\nhttps://testing.imgix.net/image.jpg?w=906 906w,\nhttps://testing.imgix.net/image.jpg?w=1050 1050w,\nhttps://testing.imgix.net/image.jpg?w=1218 1218w,\nhttps://testing.imgix.net/image.jpg?w=1414 1414w,\nhttps://testing.imgix.net/image.jpg?w=1640 1640w,\nhttps://testing.imgix.net/image.jpg?w=1902 1902w,\nhttps://testing.imgix.net/image.jpg?w=2000 2000w\n```\n\nRemember that browsers will apply a device pixel ratio as a multiplier when selecting which image to download from a `srcset`. For example, even if you know your image will render no larger than 1000px, specifying `options: { max_srcset: 1000 }` will give your users with DPR higher than 1 no choice but to download and render a low-resolution version of the image. Therefore, it is vital to factor in any potential differences when choosing a minimum or maximum range.\n\n**Note:** that according to the [imgix API](https://docs.imgix.com/apis/url/size/w), the maximum renderable image width is 8192 pixels.\n\n#### Variable Qualities\n\nThis library will automatically append a variable `q` parameter mapped to each `dpr` parameter when generating a [fixed-image](https://github.com/imgix/js-core#fixed-image-rendering) srcset. This technique is commonly used to compensate for the increased filesize of high-DPR images. Since high-DPR images are displayed at a higher pixel density on devices, image quality can be lowered to reduce overall filesize without sacrificing perceived visual quality. For more information and examples of this technique in action, see [this blog post](https://blog.imgix.com/2016/03/30/dpr-quality).\n\nThis behavior will respect any overriding `q` value passed in as a parameter. Additionally, it can be disabled altogether by passing `{ disableVariableQuality: true }` to the third argument of `buildSrcSet()`.\n\nThis behavior specifically occurs when a [fixed-size image](https://github.com/imgix/js-core#fixed-image-rendering) is rendered, for example:\n\n```js\nconst client = new ImgixClient({\n  domain: 'testing.imgix.net',\n});\n\nconst srcset = client.buildSrcSet('image.jpg', { w: 100 });\n\nconsole.log(srcset);\n```\n\nWill generate a srcset with the following `q` to `dpr` mapping:\n\n```html\nhttps://testing.imgix.net/image.jpg?w=100\u0026dpr=1\u0026q=75 1x,\nhttps://testing.imgix.net/image.jpg?w=100\u0026dpr=2\u0026q=50 2x,\nhttps://testing.imgix.net/image.jpg?w=100\u0026dpr=3\u0026q=35 3x,\nhttps://testing.imgix.net/image.jpg?w=100\u0026dpr=4\u0026q=23 4x,\nhttps://testing.imgix.net/image.jpg?w=100\u0026dpr=5\u0026q=20 5x\n```\n\nQuality parameters is overridable for each `dpr` by passing `variableQualities` parameters.\n\n```js\nconst client = new ImgixClient({\n  domain: 'testing.imgix.net',\n});\n\nconst srcset = client.buildSrcSet(\n  'image.jpg',\n  { w: 100 },\n  { variableQualities: { 1: 45, 2: 30, 3: 20, 4: 15, 5: 10 } },\n);\n\nconsole.log(srcset);\n```\n\nWill generate the following custom `q` to `dpr` mapping:\n\n```html\nhttps://testing.imgix.net/image.jpg?w=100\u0026dpr=1\u0026q=45 1x,\nhttps://testing.imgix.net/image.jpg?w=100\u0026dpr=2\u0026q=30 2x,\nhttps://testing.imgix.net/image.jpg?w=100\u0026dpr=3\u0026q=20 3x,\nhttps://testing.imgix.net/image.jpg?w=100\u0026dpr=4\u0026q=15 4x,\nhttps://testing.imgix.net/image.jpg?w=100\u0026dpr=5\u0026q=10 5x\n```\n\n#### Disable Path Encoding\n\nThis library will encode by default all paths passed to both `buildURL` and `buildSrcSet` methods. To disable path encoding, pass `{ disablePathEncoding: true }` to the third argument `options` of `buildURL()` or `buildSrcSet()`.\n\n```js\nconst client = new ImgixClient({\n  domain: 'testing.imgix.net',\n});\n\nconst src = client.buildURL(\n  'file+with%20some+crazy?things.jpg',\n  {},\n  { disablePathEncoding: true },\n);\nconsole.log(src);\n\nconst srcset = client.buildSrcSet(\n  'file+with%20some+crazy?things.jpg',\n  {},\n  { disablePathEncoding: true },\n);\nconsole.log(srcset);\n```\n\nNormally this would output a src of `https://testing.imgix.net/file%2Bwith%2520some%2Bcrazy%3Fthings.jpg`, but since path encoding is disabled, it will output a src of `https://testing.imgix.net/file+with%20some+crazy?things.jpg`.\n\n### Custom URL encoding\n\nThis library will encode by default using `encodeURI()`,  `encodeURIComponent()`, or a combination of the two depending on the image path and parameters.\nYou can define a custom encoding function in `buildURL's `options` object **if** you wish to override this behavior. Note that encoding your own URL can result in a URL that is **not** recognized by the imgix rendering API.\n\n```js\nconst ImgixClient = require(\"@imgix/js-core\");\nconst client = new ImgixClient({\n  domain: 'test.imgix.com',\n  secureURLToken: 'xxxxxxxx',\n});\n\nclient.buildURL(\n  \"https://proxy.imgix.net/image.jpg\",\n  {\n    \"txt\": \"test!(')*\"\n  },\n  {\n    encoder: (path) =\u003e encodeURI(path).replace(\"'\", \"%27\")\n  }\n)\n\n/*\n  output:\n  https://proxy.imgix.net/image.jpg?txt=test!(%27)\n*/\n\n```\n\nThe custom encoder also accepts a second optional parameter `key` which allows users to modify how query parameters are encoded. This parameter does not affect the custom encoding logic of the image path.\n\n```js\nconst ImgixClient = require(\"@imgix/js-core\");\nconst client = new ImgixClient({\n  domain: 'test.imgix.com',\n  secureURLToken: 'xxxxxxxx',\n});\n\nclient.buildURL(\n  \"https://proxy.imgix.net/image.jpg\",\n  {\n    \"txt\": \"test!(')*\"\n  },\n  {\n    encoder: (value, key) =\u003e key?.substr(-2) === '64' ? Base64.encodeURI(value) : value.replace(' ', \"+\")\n  }\n)\n```\n\n### Web Proxy Sources\n\nIf you are using a [Web Proxy Source](https://docs.imgix.com/setup/creating-sources/web-proxy), all you need to do is pass the full image URL you would like to proxy to `@imgix/js-core` as the path, and include a `secureURLToken` when creating the client. `@imgix/js-core` will then encode this full URL into a format that imgix will understand, thus creating a proxy URL for you.\n\n```js\nimport ImgixClient from '@imgix/js-core';\n\nconst client = new ImgixClient({\n  domain: 'my-proxy-domain.imgix.net',\n  secureURLToken: '\u003ctoken\u003e',\n});\n\nclient.buildURL('https://example.com/image-to-proxy.jpg', {});\nclient.buildSrcSet('https://example.com/image-to-proxy.jpg', {});\n```\n\n## What is the `Ixlib` Param on Every Request?\n\nFor security and diagnostic purposes, we sign all requests with the language and version of library used to generate the URL.\n\nThis can be disabled by passing a falsy value for the `includeLibraryParam` option to `new ImgixClient`:\n\n```js\nnew ImgixClient({\n  domain: 'my-source.imgix.net',\n  includeLibraryParam: false,\n});\n```\n\n## Support for Management API\n\nUsers looking for client library support for the imgix [management API](https://docs.imgix.com/apis/management) should use the [imgix-management-js](https://github.com/imgix/imgix-management-js) library. These two projects may be merged at a future date.\n\n## Testing\n\n@imgix/js-core uses mocha for testing. Here’s how to run those tests:\n\n```bash\nnpm test\n```\n\n## License\n\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fimgix%2Fimgix-core-js.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fimgix%2Fimgix-core-js?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimgix%2Fjs-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimgix%2Fjs-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimgix%2Fjs-core/lists"}