# Imghub APIs

With the web3 apps growing, more and more dApps are needing to retrieve images from decentralized storage networks like IPFS and Filecoin. Based on the research, we have found that most dApps do not require showing the original photos but only show thumbnails, avatars, or compressed and resized images, for example, the NFT marketplaces, the crypto games, the Metaverse, and the dApps, etc. As you may know, if you use an IPFS CID ([content identifier](https://docs.ipfs.io/concepts/content-addressing/)) to fetch the image, it will return the original size. Unfortunately, there is no straightforward and native approach to automatically make images from decentralized storage networks fit into the responsive UI.

The Imghub (former Img8 protocol) provides a gateway with native image processing and optimization protocol for IPFS and Filecoin to web3 developers, designers, and creators. They can specify what they need in the query parameters of the gateway access URL like `https://gateway.omnidata.xyz/ipfs/CID?w=200` and it will return the compressed and resized image with a width of 200px. It's easy peasy.

## Original image

Get the original image by using the IPFS CID:

{% content-ref url="/pages/10K40y0VoejgikhHov6u" %}
[Original image from IPFS](/gateway/imghub-apis/original-image-from-ipfs.md)
{% endcontent-ref %}

## Resize image

Get resized image by using the IPFS CID:

{% content-ref url="/pages/mPkaploA9OxaXQWdSQjT" %}
[Resize image](/gateway/imghub-apis/resize-image.md)
{% endcontent-ref %}

## Avatar

Generate a circled avatar image:

{% content-ref url="/pages/2sBxxmvnaiwSESvALAov" %}
[Avatar](/gateway/imghub-apis/avatar.md)
{% endcontent-ref %}

## Composite image

Compositing a new image over the processed image:

{% content-ref url="/pages/whyzIzEYmcG2w5PjW4ag" %}
[Composite image](/gateway/imghub-apis/composite-image.md)
{% endcontent-ref %}

## Rotate image

{% content-ref url="/pages/fbjaSdgtlIt6wdoC4aml" %}
[Rotate image](/gateway/imghub-apis/rotate-image.md)
{% endcontent-ref %}

## Flip image

{% content-ref url="/pages/jfhKBdO2pWgoDagO2ZIC" %}
[Flip image](/gateway/imghub-apis/flip-image.md)
{% endcontent-ref %}

## Flop image

{% content-ref url="/pages/xn4jOVAoLgHiIbNvQ2tq" %}
[Flop image](/gateway/imghub-apis/flop-image.md)
{% endcontent-ref %}

## Blur image

{% content-ref url="/pages/3YpHoM9tnpMJYBhTRJet" %}
[Blur image](/gateway/imghub-apis/blur-image.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.omnidata.xyz/gateway/imghub-apis.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
