![]()
A missing Site Assets Library in SharePoint Online – in SharePoint online communication site, many times we might notice that the asset library list template is missing while we try to add an app from a site content menu – this issue was not there earlier, Microsoft had set this limitation from 2019 onwards. In this article, we will learn how to fix the missing site assets library in SharePoint Online site so that we can add the site assets library from the site content menu.
For example, below is my communication site where if we go to add an app from the site content menu, we don’t see the “Site Assets” library, and when we search the “Site Assets” library we will see the below error message – “We didn’t find a match here, but check out the hundreds of results in the SharePoint Store. We didn’t find a match here but search across all your apps.”
![[Fixed]: Missing Site Assets Library in SharePoint Online 3 Site Assets library is missing in SharePoint Online communication site](https://i0.wp.com/global-sharepoint.com/wp-content/uploads/2021/03/Site-Assets-library-is-missing-in-SharePoint-Online-communication-site.jpg?resize=1084%2C473&ssl=1)
Before getting into the issue fixing let us understand what is site library in SharePoint Online.
What is site asset library in SharePoint Online?
In SharePoint Online, the Site Assets library is a special document library created automatically when certain features or functionalities are enabled on a site, such as when a wiki page or a web part is added. This library serves as a repository for various assets used on the site, including images, documents, style sheets, and other media files.
Key Features of the Site Assets Library
- Automatic Creation
- The Site Assets library is created automatically when specific site features require storage for files and assets. For example, adding a wiki page, a web part, or customizing a page with images will trigger its creation.
- Storage for Site Resources
- It stores resources such as images, documents, and media files that are used across the site.
- Commonly used for storing assets that are referenced in pages, web parts, or custom scripts.
- Default Library
- It is one of the default libraries in SharePoint Online, ensuring that there is always a designated place for storing site-related assets.
- The library is named “Site Assets” and can be found in the Site Contents of the SharePoint site.
- Access and Permissions
- The permissions for the Site Assets library typically inherit from the site, but they can be customized to restrict or grant access as needed.
- Users with appropriate permissions can upload, edit, and manage the files stored in this library.
- Integration with Site Features
- Integrated with various SharePoint features, such as site pages, web parts, and custom branding.
- Ensures that assets are organized and easily accessible for use in site customization and content creation.
Common Uses of the Site Assets Library
- Storing Images and Media
- Used to store images and media files that are embedded in site pages, news posts, and web parts.
- Ensures that all media assets are centralized and easy to manage.
- Managing Site Customizations
- Stores CSS, JavaScript files, and other customizations that are applied to enhance the site’s appearance and functionality.
- Facilitates the management and deployment of custom scripts and styles across the site.
- Wiki Page Resources
- When a wiki page library is used on the site, the Site Assets library stores the associated images and files.
- Supports the creation and maintenance of rich wiki pages with embedded media.
- Web Part Assets
- Stores assets used by web parts, such as images, documents, and configuration files.
- Ensures that web parts have access to the necessary resources to function correctly.
Example Usage Scenario
Customizing a Site with Images and Scripts
Imagine a scenario where a team is building an internal project site that includes various customized pages with embedded images, branding, and scripts. The Site Assets library would be used as follows:
- Uploading Images: The team uploads all necessary images to the Site Assets library. These images are then referenced in site pages and web parts.
- Custom Scripts: Custom JavaScript files and stylesheets are uploaded to the Site Assets library. These scripts are used to enhance the functionality and appearance of the site.
- Organized Storage: By storing all site-related assets in the Site Assets library, the team ensures that all resources are centralized, making it easy to manage and update them as needed.
The Site Assets library in SharePoint Online is an essential component for managing site-related resources. It provides a centralized repository for images, documents, scripts, and other media files, facilitating the customization and functionality of the site. By leveraging the Site Assets library, users can efficiently manage and deploy the necessary assets to create a rich, engaging SharePoint site.
How to fix the site assets library missing in the SharePoint Online communication site?
In multiple ways, we can fix this issue.
Approach 1: Missing Site Assets Library in SharePoint Online
Activate the “Video and rich media” site collection level feature.
![[Fixed]: Missing Site Assets Library in SharePoint Online 4 Activate Video and Rich Media site collection feature in SharePoint Online communication site](https://i0.wp.com/global-sharepoint.com/wp-content/uploads/2021/03/Activate-Video-and-Rich-Media-site-collection-feature-in-SharePoint-Online-communication-site.jpg?resize=1084%2C463&ssl=1)
Now, if we go to add the “Site Assets” library we can add it.
![[Fixed]: Missing Site Assets Library in SharePoint Online 5 Site Assets library in SharePoint Online communication site](https://i0.wp.com/global-sharepoint.com/wp-content/uploads/2021/03/Site-Assets-library-in-SharePoint-Online-communication-site.jpg?resize=615%2C515&ssl=1)
Video and rich media provides libraries, content types, and web parts for storing, managing, and viewing rich media assets, like images, sound clips, and videos.
Approach 2: Missing Site Assets Library in SharePoint Online
Activate the “SharePoint Server Publishing Infrastructure” site collection level feature and “SharePoint Server Publishing” web scope feature.
The “SharePoint Server Publishing Infrastructure” feature provides centralized libraries, content types, master pages, and page layouts and enables page scheduling and other publishing functionality for a site collection.
The “SharePoint Server Publishing” feature creates a Web page library as well as supporting libraries to create and publish pages based on page layouts.
Approach 3: Missing Site Assets Library in SharePoint Online
Using the below PnP PowerShell script, we can enable the site assets library on the particular site.
####The below script is used to enable the site assets library in SharePoint Online communication site.
cls
$PSshell = Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorVariable err -ErrorAction SilentlyContinue
if($PSshell -eq $null)
{
Add-PSSnapin "Microsoft.SharePoint.PowerShell"
}
$fileName = "Enable_SiteAssetsLibrary_using_PnP_PowerShell"
#'yyyyMMddhhmm yyyyMMdd
$enddate = (Get-Date).tostring("yyyyMMddhhmmss")
#$filename = $enddate + '_VMReport.doc'
$logFileName = $fileName +"_"+ $enddate+"_Log.txt"
$invocation = (Get-Variable MyInvocation).Value
$directoryPath = Split-Path $invocation.MyCommand.Path
$directoryPathForLog=$directoryPath+"\"+"LogFiles"
if(!(Test-Path -path $directoryPathForLog))
{
New-Item -ItemType directory -Path $directoryPathForLog
#Write-Host "Please Provide Proper Log Path" -ForegroundColor Red
}
#$logPath = $directoryPath + "\" + $logFileName
$logPath = $directoryPathForLog + "\" + $logFileName
$isLogFileCreated = $False
function Write-Log([string]$logMsg)
{
if(!$isLogFileCreated){
Write-Host "Creating Log File..."
if(!(Test-Path -path $directoryPath))
{
Write-Host "Please Provide Proper Log Path" -ForegroundColor Red
}
else
{
$script:isLogFileCreated = $True
Write-Host "Log File ($logFileName) Created..."
[string]$logMessage = [System.String]::Format("[$(Get-Date)] - {0}", $logMsg)
Add-Content -Path $logPath -Value $logMessage
}
}
else
{
[string]$logMessage = [System.String]::Format("[$(Get-Date)] - {0}", $logMsg)
Add-Content -Path $logPath -Value $logMessage
}
}
#Paramaters area
#$adminSiteURL="globalsharepoint2020-admin.sharepoint.com"
$SiteURL="globalsharepoint2020.sharepoint.com/"
$userName = "YourSPOAccount@YourTenantDomain.com"
$passWord = "YourSPOPassword"
$encPassWord = convertto-securestring -String $passWord -AsPlainText -Force
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $userName, $encPassWord
#Paramaters area - Ends
try
{
#Connect-PnPOnline -Url $SiteURL -Credentials $cred
$targetConnection=Connect-PnPOnline -Url $SiteURL -Credentials $cred -ReturnConnection
#Connecting web2 with connection
#$targetConnection = Connect-PnPOnline -Url $SiteURL -Credentials $cred -ReturnConnection
#$targetConnection = Connect-PnPOnline -Url $SiteURL -CurrentCredentials $cred -ReturnConnection
$targetWeb = Get-PnPWeb -Connection $targetConnection
$targetWeb.lists.EnsureSiteAssetsLibrary()
}
catch
{
$ErrorMessage = $_.Exception.Message +"in enabling site assets library in communiction site!:"
Write-Host $ErrorMessage -BackgroundColor Red
Write-Log $ErrorMessage
}
While executing the above script we might get the below error, for that, we need to verify that we have successfully connected to the site.
format-default : The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested. + CategoryInfo : NotSpecified: (:) [format-default], CollectionNotInitializedException + FullyQualifiedErrorId : Microsoft.SharePoint.Client.CollectionNotInitializedException,Microsoft.PowerShell.Commands.FormatDefaultCommand
Summary: Picture library in SharePoint Online
Thus, in this article, we have learned the below with respect to missing the site assets library in the SharePoint Online communication site:
- How to fix the missing site assets Library in SharePoint Online communication site.
- How to fix the “format-default: The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.” error.
- How to use the Get-PnPWeb command with an example.
- How to fix the issue when we see that the asset library is missing in SharePoint Online.
See Also: SharePoint Troubleshooting Articles
You may also like the below SharePoint troubleshooting articles:
- How to fix Open with Explorer issues in SharePoint Online?
- [Fixed]: How to fix No gulpfile found in SPFx framework project
- [Fixed] Error – activate the SharePoint Server Publishing Infrastructure feature in SharePoint Online site
- [Fixed] Server relative urls must start with SPWeb.ServerRelativeUrl”in reading web part properties!
- [Fixed]: The page could not be created. Custom Scripting might be deactivated on the destination site or you might not have sufficient permissions.
- [Fixed] The upgraded database schema doesn’t match the TargetSchema(Failed to upgrade SharePoint Products)
- [Fixed] “Sorry, something went wrong. There was an exception in the Database” (SharePoint Server Error)
- [Fixed] How to fix the “Unexpected response from server. The status code of response is ‘500’ in SharePoint 2016 Search error.”?
- [Fixed] How to fix the wrong tenant credential error in SharePoint online?
- [Fixed] How to fix request timed out error in SharePoint 2016 search (There was no endpoint listening)?
- [Fixed] How to Fix a SharePoint 404 Error in sub site After Restoring a Content Database?
- Create an organization assets library
1 comments on “[Fixed]: Missing Site Assets Library in SharePoint Online”