Hello,
Thanks for your question and your interest in my plugin 🙂
MP3 files are not automatically supported by the plugin, nor are they currently available in the settings. To import MP3 files, you need to perform the following steps once:
- Add the following PHP code to your project to include MP3s as an available file type (e.g., in your child theme or via a code snippets plugin):
add_filter( 'efml_supported_mime_types', function( $list ) {
$list['audio/mpeg'] = array(
'label' => 'MP3',
'ext' => 'mp3'
);
return $list;
} );
- Then, go to Settings > External Files in Media Library > General Settings. At the very top, you will find the settings for allowed file types in your project to import. Select the newly added MP3 option there. Save, and you’re done.
You can now import MP3 files 🙂 By the way, the general procedure for cases like this is also documented here: https://github.com/threadi/external-files-in-media-library/blob/master/docs/MimeTypes.md
I plan to add MP3 files to the list in a future update so that the PHP code will no longer be necessary.
Thanks for the immediate response, as always !
This sounds easy enough and I tried both methods, but alas, no change to the list of file types.
These aren’t two methods – they’re a single process. You have to complete step 1 first, and then step 2. You can’t do step 2 without completing step 1.
It’s also important where you’ve stored the PHP code. Where is it?
You said, “in your child theme or via a code snippets plugin”.
I dropped the code in functions.php with the child theme file editor and as this didn’t seem to work, used the Code Snippets plugin to add this snippet and set it active.
oops, found it… wasn’t in file types but under meme-types. It’s of course working now. Thank you!