You have the possibility to create an ebook in makdown, using then the pandoc software.
You will get all information here: Creating an ebook with pandoc
pandoc is available for Windows, linux, macOS, Chrome OS.
Here is a few information extracted from this site.
A simple example:
% My Book
% Sam Smith
This is my book!
# Chapter One
Chapter one is over.
# Chapter Two
Chapter two has just begun.
And you can generate the .epub with the command
pandoc mybook.txt -o mybook.epub
You can simply insert images as usually in markdown:
Things become more tricky if you want to personalise the format of the book. You will need for example to write a specific .css file.
However, if you want to build many books with basically the same format, a single .css file can be used for all.