{"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

Soo.. Let’s have a look in the shared media library solutions<\/h2>\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

Can we though?<\/h2>\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

That’s a quick conclusion..<\/h2>\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\n

Check it out here: https:\/\/github.com\/humanmade\/amf-wordpress<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"

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. Soo.. Let’s have a look […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[1],"tags":[],"acf":[],"yoast_head":"\nShared media library in WordPress Multisite - Marinus Klasen<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mklasen.com\/shared-media-library-in-wordpress-multisite\/\" \/>\n<meta property=\"og:locale\" content=\"nl_NL\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Shared media library in WordPress Multisite - Marinus Klasen\" \/>\n<meta property=\"og:description\" content=\"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. Soo.. Let’s have a look […]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mklasen.com\/shared-media-library-in-wordpress-multisite\/\" \/>\n<meta property=\"og:site_name\" content=\"Marinus Klasen\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/marinus.klasen\" \/>\n<meta property=\"article:author\" content=\"http:\/\/facebook.com\/marinus.klasen\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-14T13:02:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-07-14T13:06:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mklasen.com\/content\/uploads\/2020\/03\/cropped-cropped-mklasen-logo-margin-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"512\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Marinus Klasen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@http:\/\/twitter.com\/marinusklasen\" \/>\n<meta name=\"twitter:site\" content=\"@marinusklasen\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Marinus Klasen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/mklasen.com\/shared-media-library-in-wordpress-multisite\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/mklasen.com\/shared-media-library-in-wordpress-multisite\/\"},\"author\":{\"name\":\"Marinus Klasen\",\"@id\":\"https:\/\/mklasen.com\/#\/schema\/person\/bbad02776afb72dfba2ebfe1956a4e29\"},\"headline\":\"Shared media library in WordPress Multisite\",\"datePublished\":\"2021-07-14T13:02:59+00:00\",\"dateModified\":\"2021-07-14T13:06:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/mklasen.com\/shared-media-library-in-wordpress-multisite\/\"},\"wordCount\":386,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\/\/mklasen.com\/#\/schema\/person\/bbad02776afb72dfba2ebfe1956a4e29\"},\"articleSection\":[\"General\"],\"inLanguage\":\"nl-NL\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/mklasen.com\/shared-media-library-in-wordpress-multisite\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/mklasen.com\/shared-media-library-in-wordpress-multisite\/\",\"url\":\"https:\/\/mklasen.com\/shared-media-library-in-wordpress-multisite\/\",\"name\":\"Shared media library in WordPress Multisite - Marinus Klasen\",\"isPartOf\":{\"@id\":\"https:\/\/mklasen.com\/#website\"},\"datePublished\":\"2021-07-14T13:02:59+00:00\",\"dateModified\":\"2021-07-14T13:06:09+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/mklasen.com\/shared-media-library-in-wordpress-multisite\/#breadcrumb\"},\"inLanguage\":\"nl-NL\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/mklasen.com\/shared-media-library-in-wordpress-multisite\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/mklasen.com\/shared-media-library-in-wordpress-multisite\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/mklasen.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"General\",\"item\":\"https:\/\/mklasen.com\/general\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Shared media library in WordPress Multisite\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/mklasen.com\/#website\",\"url\":\"https:\/\/mklasen.com\/\",\"name\":\"Marinus Klasen\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/mklasen.com\/#\/schema\/person\/bbad02776afb72dfba2ebfe1956a4e29\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/mklasen.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"nl-NL\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/mklasen.com\/#\/schema\/person\/bbad02776afb72dfba2ebfe1956a4e29\",\"name\":\"Marinus Klasen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"nl-NL\",\"@id\":\"https:\/\/mklasen.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/mklasen.com\/content\/uploads\/2021\/01\/DONE1171.jpg\",\"contentUrl\":\"https:\/\/mklasen.com\/content\/uploads\/2021\/01\/DONE1171.jpg\",\"width\":1500,\"height\":1000,\"caption\":\"Marinus Klasen\"},\"logo\":{\"@id\":\"https:\/\/mklasen.com\/#\/schema\/person\/image\/\"},\"description\":\"Marinus has been working in software\/web development for more than a decade. Since 2020 his attention shifted on sharing knowledge and developing products and tools for sharing knowledge. Marinus Klasen on Twitter\",\"sameAs\":[\"http:\/\/facebook.com\/marinus.klasen\",\"https:\/\/nl.linkedin.com\/in\/marinusklasen\",\"https:\/\/twitter.com\/http:\/\/twitter.com\/marinusklasen\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Shared media library in WordPress Multisite - Marinus Klasen","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/mklasen.com\/shared-media-library-in-wordpress-multisite\/","og_locale":"nl_NL","og_type":"article","og_title":"Shared media library in WordPress Multisite - Marinus Klasen","og_description":"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. Soo.. Let’s have a look […]","og_url":"https:\/\/mklasen.com\/shared-media-library-in-wordpress-multisite\/","og_site_name":"Marinus Klasen","article_publisher":"http:\/\/facebook.com\/marinus.klasen","article_author":"http:\/\/facebook.com\/marinus.klasen","article_published_time":"2021-07-14T13:02:59+00:00","article_modified_time":"2021-07-14T13:06:09+00:00","og_image":[{"width":512,"height":512,"url":"https:\/\/mklasen.com\/content\/uploads\/2020\/03\/cropped-cropped-mklasen-logo-margin-1.png","type":"image\/png"}],"author":"Marinus Klasen","twitter_card":"summary_large_image","twitter_creator":"@http:\/\/twitter.com\/marinusklasen","twitter_site":"@marinusklasen","twitter_misc":{"Written by":"Marinus Klasen","Est. reading time":"2 minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mklasen.com\/shared-media-library-in-wordpress-multisite\/#article","isPartOf":{"@id":"https:\/\/mklasen.com\/shared-media-library-in-wordpress-multisite\/"},"author":{"name":"Marinus Klasen","@id":"https:\/\/mklasen.com\/#\/schema\/person\/bbad02776afb72dfba2ebfe1956a4e29"},"headline":"Shared media library in WordPress Multisite","datePublished":"2021-07-14T13:02:59+00:00","dateModified":"2021-07-14T13:06:09+00:00","mainEntityOfPage":{"@id":"https:\/\/mklasen.com\/shared-media-library-in-wordpress-multisite\/"},"wordCount":386,"commentCount":3,"publisher":{"@id":"https:\/\/mklasen.com\/#\/schema\/person\/bbad02776afb72dfba2ebfe1956a4e29"},"articleSection":["General"],"inLanguage":"nl-NL","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/mklasen.com\/shared-media-library-in-wordpress-multisite\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/mklasen.com\/shared-media-library-in-wordpress-multisite\/","url":"https:\/\/mklasen.com\/shared-media-library-in-wordpress-multisite\/","name":"Shared media library in WordPress Multisite - Marinus Klasen","isPartOf":{"@id":"https:\/\/mklasen.com\/#website"},"datePublished":"2021-07-14T13:02:59+00:00","dateModified":"2021-07-14T13:06:09+00:00","breadcrumb":{"@id":"https:\/\/mklasen.com\/shared-media-library-in-wordpress-multisite\/#breadcrumb"},"inLanguage":"nl-NL","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mklasen.com\/shared-media-library-in-wordpress-multisite\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/mklasen.com\/shared-media-library-in-wordpress-multisite\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/mklasen.com\/"},{"@type":"ListItem","position":2,"name":"General","item":"https:\/\/mklasen.com\/general\/"},{"@type":"ListItem","position":3,"name":"Shared media library in WordPress Multisite"}]},{"@type":"WebSite","@id":"https:\/\/mklasen.com\/#website","url":"https:\/\/mklasen.com\/","name":"Marinus Klasen","description":"","publisher":{"@id":"https:\/\/mklasen.com\/#\/schema\/person\/bbad02776afb72dfba2ebfe1956a4e29"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mklasen.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"nl-NL"},{"@type":["Person","Organization"],"@id":"https:\/\/mklasen.com\/#\/schema\/person\/bbad02776afb72dfba2ebfe1956a4e29","name":"Marinus Klasen","image":{"@type":"ImageObject","inLanguage":"nl-NL","@id":"https:\/\/mklasen.com\/#\/schema\/person\/image\/","url":"https:\/\/mklasen.com\/content\/uploads\/2021\/01\/DONE1171.jpg","contentUrl":"https:\/\/mklasen.com\/content\/uploads\/2021\/01\/DONE1171.jpg","width":1500,"height":1000,"caption":"Marinus Klasen"},"logo":{"@id":"https:\/\/mklasen.com\/#\/schema\/person\/image\/"},"description":"Marinus has been working in software\/web development for more than a decade. Since 2020 his attention shifted on sharing knowledge and developing products and tools for sharing knowledge. Marinus Klasen on Twitter","sameAs":["http:\/\/facebook.com\/marinus.klasen","https:\/\/nl.linkedin.com\/in\/marinusklasen","https:\/\/twitter.com\/http:\/\/twitter.com\/marinusklasen"]}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","featured_image_src":null,"featured_image_src_square":null,"author_info":{"display_name":"Marinus Klasen","author_link":"https:\/\/mklasen.com\/author\/mklasen\/"},"_links":{"self":[{"href":"https:\/\/mklasen.com\/wp-json\/wp\/v2\/posts\/702"}],"collection":[{"href":"https:\/\/mklasen.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mklasen.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mklasen.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mklasen.com\/wp-json\/wp\/v2\/comments?post=702"}],"version-history":[{"count":6,"href":"https:\/\/mklasen.com\/wp-json\/wp\/v2\/posts\/702\/revisions"}],"predecessor-version":[{"id":710,"href":"https:\/\/mklasen.com\/wp-json\/wp\/v2\/posts\/702\/revisions\/710"}],"wp:attachment":[{"href":"https:\/\/mklasen.com\/wp-json\/wp\/v2\/media?parent=702"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mklasen.com\/wp-json\/wp\/v2\/categories?post=702"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mklasen.com\/wp-json\/wp\/v2\/tags?post=702"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}