I cant find the picture library add-in for a modern communication site. Is there any feature i need to enable?
4 Answers
Few list templates are not available in communication site template. You can enable 'Team Collaboration Lists' in site features to get the picture library templates installed. Navigate to the https://yoursite/_layouts/15/ManageFeatures.aspx and activate the the feature.
in order to get Pciture Library in SharePoint Online Modern Team/Communication sites follow the below mention steps.
- Create a new Document Library.
- Go to Library Settings -> Advance Settings -> and set Allow Management of Content Type to
Yes
. - Now in Library setting page, under content types click on
Add from Existing Content type
. - Select the
Picture
content type from the list of available content types and click on OK button. - Now again in Library setting page, under content type click on
Change new button order and default content type
. Now makePicture
as default content type and uncheckDocument
. - Now go back to Library All Item view. From the
right corner on command bar menu
change the view toTiles
.
You are done here. Now you have modern library as Picture Library
.
-
am using an add-in that need a picture library in this scenario it doesnt detect any picture library Commented Nov 28, 2017 at 9:52
-
Using 3 ways we create a picture libray in the modern SharePoint Online communication/team site:
- By activating site level feature – Team Collaboration Lists
- By adding the picture content type in the library
- By the PnP provisioning template
PnP provisioning template approach:
Use the below PnP template and change the picture library template type
TemplateType="109" and URL and the do changes in the column creation section pnp:Fields as per your need.
<?xml version=”1.0”?>
<pnp:Provisioning xmlns:pnp=”http://schemas.dev.office.com/PnP/2018/07/ProvisioningSchema”>
<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>
Use the above XML in the below PnP script:
############################Description#######################################################
#The below script will create a list in SharePoint online using PnP template provisioning template.
##############################################################################################
CLS
$userName = "[email protected]"
$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:\Temp\PnP\SPListPnPProvisioning\ListTemplate.xml"
Write-host "Successfully a list has been created in SharePoint online."
Demo:
Below is my communication site:
Execute the above PnP script and verify that Picture library got created inside the communication site:
For details execution please refer the below article:
3 ways add a picture library in the communication site – SharePoint Online
Notes:
- Using this approach without activating any additional feature we can create a picture library.
-
I don't know why someone downvoted it - it is a working code, requesting to look the demo example where I have created the Picture Library using the PnP provisioning XML which is working fine, moreover, PnP is the recommended to way communicate with the SharePoint online object. Using this approach without activating any additional feature we can create picture library.– SP 2022Commented Feb 29, 2020 at 15:51
Option 1: Create a document library and put pictures in it - call it Pictures if you like! Add the Picture content type to the Doc lib and make it the default so you can see the digital image metadata. Use the Tiles view to see thumbnails of the images or surface the images in an Image Gallery web part on a page. [We found most of the 3rd party photo albums are refer to picture library instead of document library]
Option 2: Create an Image Gallery web part and add your images to the gallery. You can give the images a title and a caption as you upload them. This creates a Folder called Image Gallery (followed by a bunch of characters) as a sub-folder of the Site Pages library in the Site Assets library. [The default Image Gallery web part is not good enough, can not be show the picture as an album]
Option 3: If the purpose of adding the images is about having a fixed library to use on pages, you can also pre-upload images to a folder or directly to the Site Assets library. That's the default storage space for all images used on modern pages. The images on a page land in a Folder that is dynamically created (along with the Site Assets library) when you use your first image on a page. Each page gets a Folder with the same name as the name of the page (but if you update the page name, the folder name does not change). So the path for page images is Site Assets (library)> Site Pages (folder) > Name of Page (folder).