Skip to content

mkdocs serve not loading external images #4017

@KennedyRichard

Description

@KennedyRichard

Hello, dear mkdocs team. Didn't find an existing issue reporting this problem, so created this one.

mkdocs version 1.6.1, Python 3.10, OS is Xubuntu (GNU/Linus) 22.04.5 LTS

Problem: after executing mkdocs serve and opening the given address http://127.0.0.1:8000/, the displayed page loads normally, but external images are not displayed (instead we only see the default icon that appears when an image fails loading). The link I'm trying to load is a gif image from imgur, this one.

I have a local apache server installed on my machine and when I copy the site contents (after building it with mkdocs build) to the relevant folder, the site and the image load normally on the apache server.

Here's an image with screenshots from the website as loaded by apache (at the top) and by mkdocs serve (at the bottom):

servers comparison

Here's my mkdocs.yml:

site_name: Bionic Blue lore
site_url: https://bionicbluelore.indiesmiths.com
nav:
    - Home: README.md
    - About: about.md
repo_url: https://github.com/IndieSmiths/bionicbluelore
edit_uri: blob/develop/docs/
theme:
    name: mkdocs
    color_mode: dark
    user_color_mode_toggle: true
markdown_extensions:
    - toc:
        permalink: "#"

Thanks in advance for your attention and incredible work. Love MkDocs, just wanted to sort out this small problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions