Thursday, February 6, 2014

Media Items are not displaying... Why?

In Sitecore, there are many reasons why your media may not show up.  Depending on the reason it could even cause a problem in your page preview.

Versioning
There are two categories of Media templates in Sitecore; versioned and unversioned.

If you image will not display, make sure that it is either of an unversioned template (you can swap between the two) or that a version exists in the language you are trying to view it in.

Publishing
While this may seem obvious, you may not think about it when adding an image to a field on a template.

When the item you referenced the image on is published, it does not automatically publish the related media item.

Using workflows, there is a work around for this one.  With a little extra code that is.

Alex Shyba wrote an article describing how to automate the publish of related media items which can be found here.

Of course no solution is going to be perfect, so double check the publish status of an image if it is not showing up.