3 ways add a picture library in the communication site - SharePoint Online, add picture library to communication site

3 ways add picture library to communication site – SharePoint Online

No comments

Loading

Add picture library to communication site – in modern SharePoint, we can create only two types of sites 1. Team Site and 2. Communication Site. In the modern communication or team site, we can not add all lists/libraries the way we used to add in the classic SharePoint site, because many templates are kept hidden due to some reason. In, the picture library is one among them – so, in this article, we’ll learn how to add a picture library to the communication or team site.

Add picture library to communication site – challenge in adding picture library in SharePoint Online

Before that let’s see practically, whether can we add a picture library from the out-of-the-box SharePoint communication site?

add picture library to communication site, example of communication site
Example of communication site

Go to the site contents page:

add picture library to communication site, communication Site - Site Contents Create List - Library
Communication Site – Site Contents Create List – Library

Notes:

  • From the above “+ New” menu – we can see a very limited template, like – List, Page, Document library, App, and Subsite.

So, we cannot see the picture library option to create a picture library. Now, how can we create a picture library on the communication site?

The answer is, that there are three ways we can add or create a picture library in the SharePoint communication site.

  • By activating site level feature – Team Collaboration Lists
  • By adding the picture content type in the library
  • By the PnP provisioning template

We will see the above – how does it work?

Activate site level feature – Team Collaboration Lists

To activate the site-level feature – Team Collaboration lists, we need to go to the below page:

https://globalsharepoint2019.sharepoint.com/sites/CommunicationSiteTest1/_layouts/15/ManageFeatures.aspx

Note:

  • In the above URL, replace my site URL with your site.
Activate Team Collaboration Lists Feature in site level - communication site, add picture library to communication site
Activate Team Collaboration Lists Feature in site-level – communication site

Now go to the site contents -> Your Apps page.

We can see that the “Picture Libray” template has been added under the newest tab.

Picture Library template in the communication site
Picture Library template in the communication site

Add the picture content type in the library (add picture library to communication site)

Now we’ll see that now we can add a picture library template by adding the picture content type on the library setting page.

Here, I have taken the example of the default “Documents” library.

Go to the advanced settings page from the below page URL:

https://globalsharepoint2019.sharepoint.com/sites/CommunicationSiteTest1/_layouts/15/advsetng.aspx?List=%7BBBE37E7C%2D3884%2D44D9%2DB2DB%2DF242DB1D3C2A%7D

Select “Allow management of content types?” as yes and click on the OK button.

Add picture library to communication site, allow Management of Content Types from document library advanced setting page
Allow Management of Content Types from document library advanced setting page

Click on the “Add from existing site content types” link as below:

Add from existing site content types - Document library, add picture library to communication site
Add from existing site content types – Document library

From the “Add Content Types” page – add the “Picture” content type in the right side box then click on the OK button.

Add Content Types - Picture in Document Library
Add Content Types – Picture in Document Library

Click on the “Change new button order and default content type” link as below:

Change new button order and default content type - document library settings, add picture library to communication site
Change new button order and default content type – document library settings

Change the New Button Order – make the “Document” content type invisible and make the “Position from the top” as 1 for the “Picture” content type, then click on the OK button.

Change New Button Order in Document Library Content Type, add picture library to communication site
Change New Button Order in Document Library Content-Type

Create a picture library using the PnP provisioning template

Creating a picture library using the PnP provisioning template is the simplest way than the previous two approaches which does not need any feature activation or configuration. However, it needs PnP PowerShell installed on your machine.

List creation PnP Template:

“<?xml version=”1.0”?>
<pnp:Provisioning xmlns:pnp=”http://schemas.dev.office.com/PnP/2018/07/ProvisioningSchema”&gt;
<pnp:Preferences Generator=”OfficeDevPnP.Core, Version=3.7.1903.0, Culture=neutral, PublicKeyToken=5e633289e95c321a” />
<pnp:Templates ID=”CONTAINER-TEMPLATE-C1181F206BE84C09AAAC4B3CB21FBE32″>
<pnp:ProvisioningTemplate ID=”TEMPLATE-C1181F206BE84C09AAAC4B3CB21FBE32″ Version=”1″ Scope=”Web”>
<pnp:Lists>
<pnp:ListInstance Title=”TestPictureLibrary29022020″ TemplateType=”109″ Url=”/TestPictureLibrary29022020″ EnableFolderCreation=”false”>
<pnp:ContentTypeBindings>
<pnp:ContentTypeBinding ContentTypeID=”0x01″ Default=”true” />
<pnp:ContentTypeBinding ContentTypeID=”0x0120″ />
</pnp:ContentTypeBindings>
<pnp:Views>
<View Name=”AllItems” DefaultView=”TRUE” Type=”HTML” DisplayName=”All Items” Level=”1″ BaseViewID=”1″ ContentTypeID=”0x”>
<Query>
<OrderBy>
<FieldRef Name=”ID” />
</OrderBy>
</Query>
<ViewFields>
<FieldRef Name=”PictureType” />
<FieldRef Name=”PictureTime” />
<FieldRef Name=”Remarks” />
</ViewFields>
<RowLimit Paged=”TRUE”>30</RowLimit>
</View>
</pnp:Views>
<pnp:Fields>
<Field ID=”{1212a012-1012-4cd9-900b-411f01f2b112}” DisplayName=”Picture Type” Name=”PictureType” Type=”Text”/>
<Field ID=”{3450c003-7607-46de-8345-6c64cd2a3345}” DisplayName=”Picture Time” Name=”PictureTime” Type=”Text”/>
<Field ID=”{70ef44ad-091f-4955-a957-b0fb9b42833b}” DisplayName=”Remarks” Name=”Remarks” Type=”Text”/>
</pnp:Fields>

</pnp:ListInstance>
</pnp:Lists>
</pnp:ProvisioningTemplate>
</pnp:Templates>
</pnp:Provisioning>”

Add List/Libray to SharePoint Online using PnP Script: add picture library to communication site

CLS
$userName = "Global-sharepoint2019@globalsharepoint2019.onmicrosoft.com"
$passWord = "YourSPOPassword"
$encPassWord = convertto-securestring -String $passWord -AsPlainText -Force
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $userName, $encPassWord
 
Connect-PnPOnline -Url "https://globalsharepoint2019.sharepoint.com/sites/CommunicationSiteTest1" -Credentials $cred
 
Apply-PnPProvisioningTemplate -Path "C:\PnP Provisioning Template\Create List\CreateListTemplate.xml"
 
Write-host "Successfully a list has been created in SharePoint online."

Verify that Picture Libray got created using the PnP Provisioning template:

Picture library got created in the communication site using the PnP Provisioning template, add picture library to communication site
Picture library got created in the communication site using the PnP Provisioning template

Summary: add picture library to communication site

Thus, in this article we have learned the below:

  • How to create a picture library in the modern SharePoint online communication site.
  • How to create a picture library in the modern SharePoint Online team site.
  • How to create a picture library in the modern Sharepoint online site using the PnP Provisioning template.
  • How to deal with when the Picture Libray template is missing the site modern communication site.

See Also: add picture library to communication site

Download SharePoint Online PDF Book

Download SharePoint Online & Office 365 Administration eBook

Buy the premium version of SharePoint Online & Office 365 administration eBook from here:



Buy SharePoint Online & Office 365 Administration eBook


 

Get the free demo PDF eBook from here:

FREE DOWNLOAD

Send download link to:

Subscribe to get exclusive content and recommendations every month. You can unsubscribe anytime.

About Post Author

Do you have a better solution or question on this topic? Please leave a comment