Missing images in media library

Eric Erskine asked on December 26, 2022 21:08

Using Kentico v13.0.47 (MVC)

When I look at my media library, it is only showing 3 images when I know there are many. I also don't see any of the folders I've created. However, if I go to add an image to a page, I can navigate to and see dozens of images. The images that are embedded in content do appear on the site.

This appears to be the same issue as https://devnet.kentico.com/questions/media-library-not-showing-files but that was in a much older version of Kentico. It is not just a Chrome issue as I tested in Firefox.

Settings -> System -> Files is set to database. When I query the Media_File table, I see all of the missing images.

Any ideas on how to get the media files back?

Correct Answer

Brenden Kehren answered on December 27, 2022 15:09

I suggest the following:

  1. Read the documentation on Configuring Media Libraries. The first point of information states: By default, content of media libraries is synchronized via web farms and duplicated in the project directories of both the Xperience and live site applications.
  2. Do you see the files in both the MVC and CMS application's respective file systems?
  3. Do you have web farms enabled?
  4. If web farms are enabled, have you checked the web farm application to see if there are tasks waiting to be synchronized?
  5. Does the user you've assigned to run the application pool in IIS for both the MVC and CMS site have read/write permissions to the media library folder?
  6. Have you checked the Kentico event log?
  7. Have you checked the IIS/Server event log?
0 votesVote for this answer Unmark Correct answer

Recent Answers

Eric Erskine answered on December 27, 2022 19:29

Brendan, I do have web farms enabled, but don't see the files in the live site, only the admin section.

My setup is as follows. The Admin folder is a virtual directory inside my live site in IIS. In the Admin folder I see all the assets (inside a folder using site code name). Web farms is set to automatic at Settings -> Versioning & Synchronization -> Web Farm and all file types are checked.

When looking at the Web Farms app, I the following: WEB1-2016_Admin enabled & healthy WEB1-2016_AutoExternalWeb enabled & healthy

I see no tasks in the Web Farms application.

What am I missing on the setup of the web farm?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on December 27, 2022 19:37

Have you reviewed #5, #6, #7 from my list above?

In addition, check in the file system of the CMS and the MVC applications on your web server under their respective directories. For example:

  • CMS path = D:\Websites\Website1\Kentico\CMS<WebsiteCodeName>\media
  • MVC path = D:\Websites\Website1\MVC<WebsiteCodeName>\media

If you're building the site locally and remotely connecting to the database (many code bases, one database), this could also cause an issue. If you're uploading images to the site when you're running the site (CMS and MVC) locally, it will create an instance in the database, but only save the images locally and not on your remote server file system.

0 votesVote for this answer Mark as a Correct answer

Eric Erskine answered on December 29, 2022 16:28

Brendan, Permissions (item 5) were OK. No real errors in the logs. However, I was able to figure out the issue. Seems the entire media folder was accidentally deleted on the live site. I copied it back from the CMS media folder and all images now appear in the media library.

Thanks for your help. Item #2 above, checking for the actual files on both sites, was the real issue.

1 votesVote for this answer Mark as a Correct answer

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