Project Code 1


An image, an image! My Kingdom for a header image!

King Richard III, probably

Uses the wonderful npm package open-graph-scraper to fetch some image from a given URL.


I have a demo server running at

URL_TO_FETCH_IMAGES_FROM must be url encoded.

For example, the header image to this repo can be fetched like this:

Docker Image is built automatically to run your own server.


The package prefers open graph images, but will fall back to the first inline <img> otherwise.

This API 302 redirects requests to the found image, so you can include it (with an errorBuilder) in components like:

final String url = "";"${Uri.encodeComponent(url)}",
        (context, child, loadingProgress) {
        if (loadingProgress == null) return child;
        return CircularProgressIndicator();
    errorBuilder: (context, error, stackTrace) =>
        Text("Could not load image"),

Responses are in the ~1-3 second range, depending on a number of factors. You can put an image cache like Cloudflare in front of this API to drastically improve response times after the first fetch.

What works well

URLs with premade open graph images

URLs with img tags in the html

What doesn’t work

Pages that require javascript before loading any html

API Responses