117
Emails are hard
(lemmy.world)
Post funny things about programming here! (Or just rant about your favourite programming language.)
Multi-part MIME containing inline images is actually what you're looking for and it's fairly easy to implement.
Here's an example. They handwave over the html section that actually refers to the inline images that they embed, but that's the basic layout you need.
https://learn.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxcmail/7a08211a-760a-41af-8cab-0acf462c4094