Where does our Media items sit in Sitecore?

In case you have worked in website deployment then you will remember that if we forget to get the image from the physical folder (Assets) from lower to higher environment then it use to be a big issue.

Now you don’t have to upload the images/media files in the physical folder. Once you upload the media file through Sitecore dashboard, it will be saved in the database.

Hence there is very less error of missing out the changes related to the media files during the deployment and since it is placed in Database and cached in Media cache. The performance is also faster.

So to access Media Library, there are multiple ways.

  1. From the Launchpad
  2. From the Desktop interface.
  3. From the item which has General link or Image field.

Now lets check from Launchpad.

  1. Go to the Sitecore instance (http://learningsitecore/sitecore)
  2. Enter the credentials (admin/b)
  3. On the Launchpad, you should be able to see the Media Library.
  4. It looks like a Content Editor but only options here are related to media files.
  5. The best practice is to create a folder dedicated to our website and then divide it further for Modules or Pages like News, Blogs, Home page, etc.
  6. So lets create a folder for Website – ‘Learning Sitecore’.
  7. Right click on Media Library >> Insert >> Media Folder
  8. Name it ‘Learning Sitecore’ and click OK.
  9. Right click on Learning Sitecore folder >> Insert >> Media folder
  10. Name it Home Page and click OK.
  11. Lets add a banner image which I have downloaded from Google and lets see if we can add it to the Home page.
  12. Click on Upload file.
  13. Click on Choose file.
  14. Browse the Image and click Upload.
  15. Lets publish all our changes.
  16. Click on Learning Sitecore folder.
  17. Click Publish tab >> Down arrow of Publish button >> Publish item.
  18. Click Publish button on the pop up. Click OK.
  19. Click Close once the publish is completed.
  20. Now we need to go to Content Editor so that we can link the new image to the Banner on Home page.
  21. Click on the bricks button in upper left corner to navigate to Launchpad
  22. Click on Content Editor.
  23. Click on Home >> Click Show Editor to update the description.
  24. Navigate to wherever you want image and click on the Add Image button.
  25. The Media Library pop up will be opened.
  26. Select the image (/Learning Sitecore/Home page/sitecore-update-banner-image) and Click Insert.
  27. Click Accept.
  28. Save the changes and publish the item.
  29. Click on Publish tab >> Down arrow near Publish button >> Publish Item.
  30. Click Publish and Ok.
  31. Click close once the publishing is completed.
  32. Browse the front end site (http://learningsitecore/)

Like wise we can upload any media files and use it in our website. So what we learnt is all the media files in Sitecore sits in Media Library and no actual physical file is needed in the website folder. All the files are uploaded in the database.

In the next blog, we will work on the Renderings and then we will done with the basics of Sitecore and can move to the dummy site or one pager site.

Thank you.. Keep Learning.. Keep Sitecoring.. 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s