humanmade / network-media-library

Network Media Library plugin for WordPress Multisite
MIT License
288 stars 55 forks source link

How to change the central media library to the "main" site? #93

Open CNiessen opened 1 year ago

CNiessen commented 1 year ago

Hi,

We just installed and activated the plugin. We have fairmas.com (English site) as our main site. I realized that the central library (where you have the possibility to delete) is the German site (fairmas.com/de). We are not sure how this happened. Can you guide me how to change this to the EN one instead?

Also, can you please confirm that when we upload an image on the main central library (fairmas.com English site), for example "ABC.png (50kb)", as it will show up in our /de, /es and /fr multi-site library as well. Does this mean that the main storage would only be just for the original single file of 50kb and would not store 200kb (50kb x 4 multisites)?

Thank you in advance for your help, CNiessen

Johannf78 commented 5 months ago

Install the code snippet plugin. https://wordpress.org/plugins/code-snippets/

Add this this code on the Network Admin site.

//Change the location of the shared network media libary to site one, (Default is site two) add_filter( 'network-media-library/site_id', function( $site_id ) { //Change this number to the site you want as the source of your shared media library return 1; } );