Are images deleted if they are no longer included in any note?

The problem is that I do not know, if the API actually takes the history into account either. This is something only @laurent would know - or someone who worked at the note history code.