# images

## Table of Contents

- [Options](#options)
- [Examples](#examples)

---

Sweeps every `img` element and returns each `src` as an absolute, deduped URL:

```js
constimages=awaitmicrolink.images('https://example.com')
```

## Options

Override the default rule of `selectorAll: 'img'`, `attr: 'src'`, and `type: 'url'` with [selectorAll](https://microlink.io/docs/sdk/methods/extract/selectorAll), [selector](https://microlink.io/docs/sdk/methods/extract/selector), [attr](https://microlink.io/docs/sdk/methods/extract/attr), or [type](https://microlink.io/docs/sdk/methods/extract/type).

## Examples

When a gallery lazy-loads, point `attr` at the attribute carrying the real source:

```js
constimages=awaitmicrolink.images('https://example.com/gallery',{

selectorAll:'img[data-src]',

attr:'data-src'

})
```

Or let the page render first so the real `src` is in place:

```js
constimages=awaitmicrolink.images('https://example.com/gallery',{

prerender:true,

scroll:'footer'

})
```

Open Graph and Twitter Card images live in `meta` tags rather than `img` elements; use [metadata](https://microlink.io/docs/sdk/methods/metadata) for the page's representative image, or an [extract](https://microlink.io/docs/sdk/methods/extract) rule with `type: 'image'` to get dimensions and size for each URL.