A module to import media files from public directory into media library.
There are a lot of tutorials on how to import file entities into media galleries using migration tools. But they are neither practical nor easy. This simple module imports your previously uploaded images into media library.
This module can also import unmanaged files. If you simply upload a folder containing images (and subfolders containing other image files) all the image files in the uploaded folders will be converted to media entities.
NEW: Now non-image files (pdf,docx,xlsx,pptx amd mp4 files) can also be imported.
The module requires the Drupal core Media and Media Library modules.
Since 2.0 it requires additional Queue Ui contrib module to properly process queue with batch imports.
composer
, or unpack the code base in the *modules* folder, currently in the root of your Drupal installation.drush en media-library
;drush media-library:import
or drush mli
(alias);You can run import as many times as you like without occurring into duplications. Once created, Media entities will not be re-created if already existing with the same source file.