This issue might occcur in SharePoint on premise versions 2013, 2016 and 2019.

Issue description:

Images do not load properly or load with full size that is without rendition. This can happen if Blob Cache is corrupted on one of the Web Front end or web front ends are not synced between each other.

What is Blob Cache?

A disk based cache which reduces round trip to database to get files such as images, audio or video. Once a file is requested it is copied to a disk for the first time and for subsequent requests file is fetched from dsik rather than database hence reducing load on database. More details here https://docs.microsoft.com/en-us/sharepoint/administration/flush-the-blob-cache

How to enable Blob Cache?

You need to do a change on Web.Config file in IIS, add below line, read more here https://docs.microsoft.com/en-us/sharepoint/administration/cache-settings-configuration-for-a-web-application

BlobCache location="C:\BlobCache\14" path="\.(gif|jpg|jpeg|jpe|jfif|bmp|dib|tif|tiff|themedbmp|themedcss|themedgif|themedjpg|themedpng|ico|png|wdp|hdp|css|js|asf|avi|flv|m4v|mov|mp3|mp4|mpeg|mpg|rm|rmvb|wma|wmv|ogg|ogv|oga|webm|xap)$" maxSize="10" enabled="false" />

The default max size for an image when using Image Renditions is 40 mega pixels. Should you want to modify this value you will need to add the imageRenditionMaxSourcePixels parameter. For example: <BlobCache location="C:\BlobCache\14" path="\.(gif|jpg|jpeg|jpe|jfif|bmp|dib|tif|tiff|themedbmp|themedcss|themedgif|themedjpg|themedpng|ico|png|wdp|hdp|css|js|asf|avi|flv|m4v|mov|mp3|mp4|mpeg|mpg|rm|rmvb|wma|wmv|ogg|ogv|oga|webm|xap)$" maxSize="10" imageRenditionMaxSourcePixels="100000000" enabled="true" />

Error message: I was not able to identify an error message but users complained that intranet page seems weird and images are displaying over text and etc

How to fix:

  1. Try flushing blob cache with below PowerShell command , this will not recycle the IIS so you can do it during day as well but always good to do it outside office hours.
$webApp = Get-SPWebApplication "<WebApplicationURL>"
[Microsoft.SharePoint.Publishing.PublishingCache]::FlushBlobCache($webApp)
Write-Host "Flushed the BLOB cache for:" $webApp

2. It is not necessary that above will fix the issue, in our case we identified that this did not fix the issue because cache was not getting updated in one of the web front end and time stamp was quite old.

How can you check if it is old and it’s not getting updated?

Visit the folder location of Blob cache on Web front end and each web app will have it’s own folder, check last modified date, you can also compare with other web front ends.

If your issue as explained below then do like this but make sure you have web front end outside of load balancer or you are doing in outside of office hours.

  • Disable blob cache temporarily: You can make the flag false in web.config file of the IIS which has issues, the line in web.conifg looks like below
  • <BlobCache location=”C:\BlobCache\14″ path=”\.(gif|jpg|jpeg|jpe|jfif|bmp|dib|tif|tiff|themedbmp|themedcss|themedgif|themedjpg|themedpng|ico|png|wdp|hdp|css|js|asf|avi|flv|m4v|mov|mp3|mp4|mpeg|mpg|rm|rmvb|wma|wmv|ogg|ogv|oga|webm|xap)$” maxSize=”10″ imageRenditionMaxSourcePixels=”100000000″ enabled=”true” />
  • Do an IISRESET
  • Once done please cut paste the folders inside blob cache folder in case something goes wrong.
  • Then make flag true again and do an IISRESET again
  • Thsi will start loading images in Blob cache again with fresh images and should also fix the issue.

Connect with me on Twitter or Linked In if you need more information.

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