How to load an image in HTML using Prolog?

Learning the details of creating an SWI-Prolog HTTP(S) server can be hard as there are often not many examples.

As such in the Wiki post

Useful Prolog references

is the GitHub section

The following list were hand selected for the exceptional quality of the Prolog code.

With regards to what you seek take a look at

GitHub repositories for SWI-Prolog Ludum Dare Teams

If you use the GitHub search for image (search)

you may find what you seek but more importantly many other useful ideas.