{"id":702,"date":"2021-07-14T13:02:59","date_gmt":"2021-07-14T13:02:59","guid":{"rendered":"https:\/\/mklasen.com\/?p=702"},"modified":"2021-07-14T13:06:09","modified_gmt":"2021-07-14T13:06:09","slug":"shared-media-library-in-wordpress-multisite","status":"publish","type":"post","link":"https:\/\/mklasen.com\/shared-media-library-in-wordpress-multisite\/","title":{"rendered":"Shared media library in WordPress Multisite"},"content":{"rendered":"\n
Honestly, whenever possible – I avoid the need to share media between sites but.. in this case a lot of the same media exists on multiple sites. And the hosting we’re eyeing on charges per 5GB. With a 12GB media library we want to optimise this in whatever ways possible.<\/p>\n\n\n\n
I vaguely recall HumanMade once made a plugin for this. Let’s check it out; https:\/\/github.com\/humanmade\/shared-media-library<\/p>\n\n\n\n
Sadly it hasn’t been updated in the last 2 years and the issues tab doesn’t seem that active either. <\/p>\n\n\n\n
But you know what? HumanMade appears to have another extension; https:\/\/github.com\/humanmade\/network-media-library<\/a><\/p>\n\n\n\n 48 open issues, recent ones as well. I browsed through them and found this comment:<\/p>\n\n\n\n To be honest it’s unlikely that this issue will see much attention as we’re planning on rewriting this library from scratch (or creating a replacement library) to address fundamental problems with mimicking attachment IDs. See #74.<\/p><\/blockquote>\n\n\n\n That’s definitely a discouragement for using this plugin. But we found some other details in issue 74, pointing to yet another plugin by HumanMade: https:\/\/github.com\/humanmade\/amf-wordpress\/<\/a><\/p>\n\n\n\n This plugin has recently been updated and has active issues, great! Let’s give it a try!<\/p>\n\n\n\n After activating, you can configure it via Settings -> Media. It’s as easy as just entering the URL of the website you’d like to use media from. That raises the question: Can I use other people’s media as well? \ud83e\udd14<\/p>\n\n\n\n Well, after entering a URL of one of my own websites, I do not see any other media popping up. So initially, I’d say no. But.. I cannot get multisite media to show either.. Let’s take a dive in the code..<\/p>\n\n\n\n Ok.. Let’s start with installing the Asset Manager Framework as well; https:\/\/github.com\/humanmade\/asset-manager-framework<\/a><\/p>\n\n\n\n What?! It works!<\/strong><\/p>\n\n\n\n So, the AMF WordPress project from HumanMade seems to be a solution for a lot of websites. You’d have to upload all of your assets into 1 main website, but when you do, you can easily use them on all other websites. <\/p>\n\n\n\nCan we though?<\/h2>\n\n\n\n
That’s a quick conclusion..<\/h2>\n\n\n\n