Using the IContentManager to upload an image to the media library

In the migration class, I would like to add some content (images) to the media library/folder, e.g. standard car manufactor logos that should be provided by the module.
Additionally, the logos should reside in a subfolder.

I try to figure out how to accomplish this.

My first try is this (maybe this is a completely wrong way):

I found that there is an IContentManager interface, but I do get a NullReferenceException when calling the
New method (the _contentManager itself references to a DefaultContentManager implementation):

var contentItem = _contentManager.New("Manufactor");

The NullReferenceException is caused by an empty httpContext parameter in WorkContextAccessor.cs:88 of Orchard 1.9.1:

httpContext.Items[workContextKey] = _workContext;

After debugging into the framework, it seems that this line should provide the context: (MvcModule.cs:56 of Orchard 1.9.1):

To upload images to the media library as well as turning them into 'content items' (so you can actually see them in the Media in the dashboard) you can use the MediaLibrary services. There are already services for that, so why write it yourself. Just add
a reference in your module to 'Orchard.MediaLibrary' and inject the IMediaLibraryService to make use of the functionality.