10

I'm on Drupal 7.2 with the included Media Module. I'm also using WYSIWYG if that matters at all.

I'm seeing that when a user clicks the image upload field, they have a choice of either 'web' or 'library'. The Library option shows all files that other users have uploaded to be included in other nodes. How do I disable that so that they don't see all the other files?

I don't use galleries- just upload/attach images to nodes that the users themselves create. Guests and Registered Users BOTH can see the nodes and image files- but I don't want them to have access to all the images that have been uploaded previously.

I think this has something to do with Private/Public, but I can't figure it out. Any input?

1

2 Answers 2

1

On Drupal 8+ go to: /admin/config/media/browser

Media browser options

Set the "Enabled browser plugins" to only "upload" and save the page.

Now when people click on the button in the WYSIWYG to add something, they should only get the upload option and not see the library.

Media popup

1
  • The question said they were on Drupal 7.2 Jul 22, 2022 at 21:07
0

This can be accomplished with a module, and this hook:

/**
 * Implements hook_media_browser_plugins_alter().
 */
function my_module_media_browser_plugins_alter(&$plugins) {
  // Hide the "Library" tab on the WYSIWYG media upload widget.
  unset($plugins['library']);
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.