The images were not loading in the filemanager. This meant that when the element was saved the images would be deleted for that course, affecting existing image elements as well.