🚧 The Consumet documentation is undergoing reconstruction. Please be patient for all providers to be fully-documented. 🚧
API
Manga
Mangadex
Image Proxy

Image Proxy

Technical details regarding the usage of the image proxy function for the mangadex provider can be found below. This endpoint proxies manga images to bypass CORS and hotlink protection. Example code is provided for both JavaScript and Python, along with a response schema.

Route Schema (URL)

https://api.consumet.org/manga/mangadex/proxy?url={url}

Query Parameters

ParameterTypeDescriptionRequired?Default
urlstringThe image URL to proxy (URL encoded).Yes

Request Samples

import axios from "axios";
 
// Using an example MangaDex image URL.
const imageUrl = "https://uploads.mangadex.org/covers/example.jpg";
const url = `https://api.consumet.org/manga/mangadex/proxy?url=${encodeURIComponent(imageUrl)}`;
 
const data = async () => {
    try {
        const response = await axios.get(url, { responseType: 'arraybuffer' });
        return response.data;
    } catch (err) {
        throw new Error(err.message);
    }
};
 
// Returns image binary data
console.log(data);

Usage in HTML

You can use this proxy directly in HTML img tags:

<img src="https://api.consumet.org/manga/mangadex/proxy?url=YOUR_ENCODED_IMAGE_URL" alt="Manga Image" />

Response Schema

MIME Type: image/jpeg or image/png (depends on the original image)

Returns the binary image data with appropriate headers:

  • Content-Type: The content type of the proxied image
  • Cache-Control: public, max-age=86400
  • Access-Control-Allow-Origin: *