Best Practice for sharing Media Libraries between multiple sites

Duncan Koza asked on October 25, 2019 02:12

I am going to be building two websites with Kentico 11 and I am wondering how I should best setup my Media Library so users from one site can access files in the media library from a different site.

I have been looking at the "Media Libraries folder" settings in the Settings App, along with the "Use site-specific subfolders for custom media libraries folder" I am just wondering, which of the following setups would be best and why?

Setup 1 ~/<site code name1>/media/ and ~/<site code name2>/media/

Setup 2 ~/media/<site code name1>/ and ~/media/<site code name2>/

Setup 3 ~/media/

Correct Answer

David te Kloese answered on November 15, 2019 12:37

Hi,

Depending on your requirement I usually don't want to have a lot of different folders in the root of the website.

So I usually make sure everything is stored in a /media/ folder, and when multi site I add the /sitename/.

When using full url's remember that the path will show.

So the url of an image that lives on media lib site A

will be something like www.siteB.com/media/siteA/somefolder/someimage.jpg

I can imagine some clients don't want the name of siteA in the source of SiteB.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Duncan Koza answered on November 15, 2019 22:16

So, setup 3 might be best so I don't end up showing the sitename of other sites but they all share the same media folder.

And, if I make a site that is unrelated and will not be sharing media, I would stick with setup 1 for that scenario.

Is that what you are kind of saying?

0 votesVote for this answer Mark as a Correct answer

David te Kloese answered on November 18, 2019 12:31

If the editor has access they can use the site switcher to select any media library from any site yes!

0 votesVote for this answer Mark as a Correct answer

Duncan Koza answered on November 21, 2019 21:25

Thanks David.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.