# host-image-resolver

> Resolves various image host URLs to image paths

Latest version **0.1.1** (published 2017-10-03) · WTFPL license · 0 weekly downloads

## Install

```sh
npm install host-image-resolver
pnpm add host-image-resolver
yarn add host-image-resolver
bun add host-image-resolver
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2017-10-03 |
| First published | 2016-05-30 |
| Weekly downloads | 0 |
| License | WTFPL |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Matt Hackmann |
| Maintainers | dxprog |
| Keywords | node, javascript |

## Links

- npm: https://www.npmjs.com/package/host-image-resolver
- npm.io page: https://npm.io/package/host-image-resolver

## Dependencies (2)

- [jsdom](https://npm.io/package/jsdom.md) ^9.2.1
- [request](https://npm.io/package/request.md) ^2.72.0

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2017-10-03
- 0.1.0 — 2016-05-30

## README

[![Build Status](https://travis-ci.org/dxprog/host-image-resolver.svg)](https://travis-ci.org/dxprog/host-image-resolver)

#Host Image Resolver

Talks to various image hosting services to resolve a URL into all pictures associated with said URL.

## Currently Supported Services

- imgur (auth required for albums)
- deviantArt (including fav.me URLs)
- gfycat
- tumblr (auth required)
- yande.re

## Installation

`npm install host-image-resolver`

## Configuration

Some services require authentication tokens. To set these values, you can create a `hir-config.js` file in the root of your project.

```javascript
module.exports = {
  IMGUR_CLIENT_SECRET: 'the-secret',
  TUMBLER_KEY: 'tumbl-tumbl'
};
```

## How to Use

HIR is simple to use, exposing only one public method:

```javascript
const hostImageResolver = require('host-image-resolver');

hostImageResolver('http://imgur.com/a/an-album').then((urls) => {
  console.log(urls);
  // [ 'https://i.imgur.com/image1.jpg', 'https://i.imgur.com/image2.jpg' ]
  // urls will always be an array
});
```

---
_Source: https://npm.io/package/host-image-resolver · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
