# Module: ol/source/static

This documentation is for OpenLayers v10.9.0. The latest is v.

## ol/source/static

### Functions

#### createLoader(options){ImageObjectPromiseLoader}

source/static.js, line 29

      import {createLoader} from 'ol/source/static';

  Creates a loader for static images.

  Name | Type | Description
  --- | --- | ---
  `crossOrigin` | null | string | undefined | The `crossOrigin` attribute for loaded images. Note that you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer. See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
  `referrerPolicy` | ReferrerPolicy | undefined | The `referrerPolicy` property for loaded images.
  `imageExtent` | Extent | Extent of the image in map coordinates. This is the [left, bottom, right, top] map coordinates of your image. When using this loader with an `ol/source/Image`, the same extent must be set as `extent` of the `ol/layer/Image`.
  `url` | string | Image URL.
  `load` | function | undefined | Function to perform loading of the image. Receives the created `HTMLImageElement` and the desired `src` as argument and returns a promise resolving to the loaded or decoded image. Default is `decode`.

  ##### Returns:

  Loader.

### Type Definitions

#### LoaderOptions{Object}

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `crossOrigin` | null | string | undefined | The `crossOrigin` attribute for loaded images. Note that you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer. See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
  `referrerPolicy` | ReferrerPolicy | undefined | The `referrerPolicy` property for loaded images.
  `imageExtent` | Extent | Extent of the image in map coordinates. This is the [left, bottom, right, top] map coordinates of your image. When using this loader with an `ol/source/Image`, the same extent must be set as `extent` of the `ol/layer/Image`.
  `url` | string | Image URL.
  `load` | function | undefined | Function to perform loading of the image. Receives the created `HTMLImageElement` and the desired `src` as argument and returns a promise resolving to the loaded or decoded image. Default is `decode`.