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.
    02SD01
  4. It looks like a Content Editor but only options here are related to media files.
    02SD02
  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
    02SD03
  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.
    02SD04
  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.
    02SD05
  13. Click on Choose file.
  14. Browse the Image and click Upload.
    02SD06
  15. Lets publish all our changes.
  16. Click on Learning Sitecore folder.
  17. Click Publish tab >> Down arrow of Publish button >> Publish item.
    02SD07
  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
    02SD08
  22. Click on Content Editor.
  23. Click on Home >> Click Show Editor to update the description.
    02SD09
  24. Navigate to wherever you want image and click on the Add Image button.
    02SD10
  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.
    02SD11
  30. Click Publish and Ok.
  31. Click close once the publishing is completed.
  32. Browse the front end site (http://learningsitecore/)
    02SD12

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 )

Google photo

You are commenting using your Google 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