EDIT:
Actually, the problem was a little more complicated and not related to Joplin:
- The only occurred when HTML pages were embedded in the teaching platform Canvas (Instructure)
- The reason why the export worked better in Macdown is that I could disable the syntax highlighting, which for some reason prevents the images from being displayed
- Disabling the privacy option "prevent cross site tracking" was also necessary