Add image renditions to an existing picture library
Hi all,
Consider the following scenario, i've created a new site using the Blog template. Which created a default picture library named "Photos". We have been experimenting with SharePoint and mobile devices so I thought i would give Image Renditions a
try.
What I did, is enable the Publishing features on the site and saw that the Image Renditions appeared on the Site Settings screen. What it also did, was create a new library named "Images" which has all the image rendition capabilities enabled.
Yet, to my disappointment, the "Photos" library which was created earlier and is now stuffed with data, doesn't have those capabilities :(
So now my simple question, what steps do I need to take in order to use those Image Rendition capabilities on the "old" library? I've already tried:
- Enabeling the Photos library to a Site Assets library
- Add the content type "Image" instead of Picture.
Thanks!
Check if below steps help
http://mysharepointsolution.wordpress.com/2013/05/08/image-renditions-in-sharepoint-2013/
Similar Messages
-
Hi,
I have created a custom web part to show image slider from SharePoint picture library. SharePoint stores various size image in different columns of picture library.
I am using below code to get image URL. Which column should I use to display full size image in image slider.
string ImageUrl = Convert.ToString(item["ows_EncodedAbsUrl"]);
Regards,
AmitAmit, try ows_EncodedAbsThumbnailUrl
string ImageUrl = item["ows_EncodedAbsThumbnailUrl"].ToString();
Refer Link -
https://social.msdn.microsoft.com/Forums/en-US/85e345a2-181c-4ca0-894c-ca9c3ef8b838/how-to-bind-the-image-from-the-sharepoint-list-in-gridview-using-vs-2010-as-webpart?forum=sharepointdevelopmentprevious
https://alexdinnouti.wordpress.com/2013/09/14/sharepoint-2007-photo-library-and-shadowbox/
http://galratner.com/blogs/net/archive/2011/02/27/send-a-web-page-as-an-email-with-embedded-images.aspx
http://debugmode.net/2011/02/07/fetching-image-from-sharepoint-2007-picture-library-using-object-model/
Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply. -
How can I fix the image size in a "Picture Library Slideshow Web Part"
When I upload images to be used in the Slideshow Web Part they become skewed because they are different sizes. Is there a way to fix this besides uploading images that are all the same size?
Thanks,
Kathleenhttp://webcache.googleusercontent.com/search?q=cache:bfUcFkD_bxgJ:spcodes.blogspot.com/2012/08/display-slide-show-images-within-fixed.html+&cd=4&hl=en&ct=clnk&gl=in
Display Slide Show Images within fixed size
The Picture Library Slide Show Web Part show the images stored in a picture library with slide show effect.
This slide show web part displays the images with it's original size. Due to this the web part changes its size according to the image size. If we want the slide show to run within the specific size on the page then we need to control the size of the images
to the fixed length during runtime.
To achieve this we need to add the CEWP above the picture Library Slide Show web part & insert the following script in that web part.
<style type="text/css">
.ms-WPBody TD {
PADDING-BOTTOM: 0px; BORDER-RIGHT-WIDTH: 0px; MARGIN: 0px; PADDING- WIDTH: auto !important; PADDING-RIGHT: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; HEIGHT:
auto !important; VERTICAL-ALIGN: middle; BORDER-LEFT-WIDTH: 0px; PADDING- 0px
.ms-WPBody TD DIV {
PADDING-BOTTOM: 0px; BORDER-RIGHT-WIDTH: 0px; MARGIN: 0px; PADDING- WIDTH: 100% !important; PADDING-RIGHT: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; HEIGHT:
auto !important; VERTICAL-ALIGN: middle; BORDER-LEFT-WIDTH: 0px; PADDING- 0px
.ms-WPBody TD IMG {
PADDING-BOTTOM: 0px; BORDER-RIGHT-WIDTH: 0px; MARGIN: 0px; PADDING- WIDTH: 260px !important; PADDING-RIGHT: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; HEIGHT:
190px !important; VERTICAL-ALIGN: middle; BORDER-LEFT-WIDTH: 0px; PADDING- 0px; align: center
.s4-wpcell-plain {
PADDING-BOTTOM: 0px; BORDER-RIGHT-WIDTH: 0px; MARGIN: 0px; PADDING- WIDTH: 100% !important; PADDING-RIGHT: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; HEIGHT:
auto !important; VERTICAL-ALIGN: middle; BORDER-LEFT-WIDTH: 0px; PADDING- 0px
.ms-PartSpacingVertical {
MARGIN-"color:#783f04;font-family:'Courier New',Courier,monospace;" />}
.style1 {
COLOR: #808080
}</style>
We can fix the height & width of the image in the .ms-WPBody TD IMG css.
http://sharepoint.stackexchange.com/questions/66028/picture-slideshow-web-part-image-size-too-small
How to display original images in SlideShow web part
Step 1. Save below JavaScript code to file, for example in SlideshowObjectInitializer.txt and upload it to SiteAssets Library
<script type="text/javascript">
function SlideshowObjectInitializer() {
ShowPic = (function(ShowPicOrig) {
return function() {
var ssObj = arguments[0]; //SlideShow object
var curPicIdx=ssObj.index; //current picture index
ShowPicOrig.apply(this, arguments); //call original ShowPic
//apply some changes to display original picture in SlideShow control
ssObj.image.src = ssObj.linkArray[curPicIdx]; //display original image instead of web image
//change picture & container size to auto instead of fixed (by default web image size is used)
ssObj.image.setAttribute('height','100%');
ssObj.image.setAttribute('width','100%');
var cell = ssObj.cell;
cell.style.width = 'auto';
cell.style.height = 'auto';
cell.style.display = '';
var pcell = ssObj.cell.parentNode;
pcell.style.width = 'auto';
pcell.style.height = 'auto';
})(ShowPic);
ExecuteOrDelayUntilScriptLoaded(SlideshowObjectInitializer, 'imglib.js');
</script>
Step 2. Add CEWP on page where Slideshow web part is located and in the Content Editor tool pane, under Content Link, type
/SiteAssets/SlideshowObjectInitializer.txt.
If this helped you resolve your issue, please mark it Answered -
How do I add a head shot to an existing picture?
I have a High School reunion photo, one guy came late and I want to add his headshot to the existing
picture. Operating Adobe Photoshop elements 6.I think you may be in the wrong forum. This forum is for Adobe Captivate, not Adobe Photoshop Elements.
-
Picture Library NavigationLink column value
Hi,
I have created a Sharepoint 2010 picture library. I have created a custom web part for image slider using this picture library.
I want to redirect user to NavigationLink URL of picture library item. I am using following code to get navigationlink URL:
using (SPSite site = new Microsoft.SharePoint.SPSite(SPContext.Current.Site.Url))
using (SPWeb web = site.OpenWeb())
SPList LstPicture = web.Lists[SLIDER_LIST];
SPQuery query = new SPQuery
Query = @"<Where>
<Eq>
<FieldRef Name='IsActive' />
<Value Type='Integer'>1</Value>
</Eq>
</Where>"
SPListItemCollection items = LstPicture.GetItems(query);
List<ImageCollection> lsts = new List<ImageCollection>();
foreach (SPListItem item in items)
string ImageUrl = Convert.ToString(item["ows_EncodedAbsUrl"]);
string ImageName = Convert.ToString(item["Name"]);
string Title = Convert.ToString(item["Title"]);
string Description = Convert.ToString(item["Description"]);
string IsActive = Convert.ToString(item["IsActive"]);
string NavigationLink = Convert.ToString(item["NavigationLink"]);
imageslist.Add(new ImageCollection(ImageUrl, ImageName, Title, Description, IsActive,NavigationLink));
Problem is it is giving me navigation link and desciption in item["NavigationLink"] field value. However I need only URL of the image. Which column of Picture library give me only Navigation URL without description.
Regards,
AmitHi,
Is Sudip's suggestion helpful to you?
Can you show what value retrieved in the "NavigationLink" field(screenshot would be better)? If you can get link and description all in once, then there
should be a method to extract the URL from it using C#.
Thanks
Patrick Liang
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support,
contact [email protected]
Patrick Liang
TechNet Community Support -
How to deploy file using module in existing document library ?
Hello,
I have picture library where I want to upload image using module
Location is "asset-library/PublishingImages/Images"
PublishingImages - Picture Library
Images - Folder name under PublishingImages picture library
I have added via module as below :
<!-- Image Files Start -->
<Module Name="WebFiles" Url="/asset-library/PublishingImages/Images" Path="WebFiles\Images" >
<File Path="newContent.jpg" Url="newContent.jpg" Type="GhostableInLibrary" />
</Module>
<!-- Image Files End -->
However when I activate the feature , it throws below error
The URL '/asset-library/PublishingImages/Images' is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.
while URL is correct - would you please suggest where I am wrong ?
Thanks and Regards,
Dipti ChhatrapatiHi Dipti,
You simply need the URL attribute of the module as
Url="/PublishingImages/Images"
I am assuming asset-library is your sub site name. and if so it would not be required in URL of module
Cheers! Kapil Happy SharePointing PS: Please mark the reply as answer if it is what you are looking for. -
Hello people
how can i stretch images to fit into my picture library webpart?
also how can i remove the Home tab that comes with change the look.Hi,
Let’s verify the following:
Whether you use the picture library web part or Image Viewer web part or Picture Library Slideshow Web Part.
I think you should custom the web part to stretch images to fit into your web part. There is no OOTB method to achieve it.
Whether the home tab is your library name.
To remove the Home tab, edit the web part->Appearance->”Chrome” choose none.
Best Regards,
Lisa Chen
Lisa Chen
TechNet Community Support -
Picture library and content types
Hey,
I have created a Picture library in SharePoint.
Now I want to add a custom content type to picture library.
SPSite oSite = new SPSite("http://
SPWeb oWeb = oSite.OpenWeb();
SPList oList = oWeb.Lists["Picture"];
SPContentType oDocContentType = oWeb.AvailableContentTypes["Stefan Picture"];
oList.ContentTypesEnabled = true;
oList.ContentTypes.Add(oDocContentType);
oList.Update()
But this code adds 2 content types to the picture library (picture and Stefan picture). What I can do so only the content type Stefan Picture will be added to the document library?
Thanks for your help
StefanThanks Samuel for your help.
When I delelte in the schema.XML the contenttype attribute and set
ContentTypesEnabled=false
then will be (after run the code
SPSite oSite = new SPSite("http://
SPWeb oWeb = oSite.OpenWeb();
SPList oList = oWeb.Lists["Picture"];
SPContentType oDocContentType = oWeb.AvailableContentTypes["Stefan Picture"];
oList.ContentTypesEnabled = true;
oList.ContentTypes.Add(oDocContentType);
oList.Update()
in an event receiver) only one content type shows up in the new button.
Regards
Stefan -
How to add folder in picture library programmatically
Hi All,
I tried to add folder using below code but getting error of "Missing FileLeaf"
try
if (properties.List.Title.ToString() == Utility.ListName.Events.ToString())
using (SPSite objSite = properties.Site)
using (SPWeb objWeb = properties.Web)
SPListItem lstEvent = properties.ListItem;
string folderName = Convert.ToString(lstEvent["Title"]) + "_" + DateTime.Now.ToShortDateString();
if (!string.IsNullOrEmpty(folderName))
SPList lstEventPictures = objWeb.Lists.TryGetList(Utility.LibraryName.EventPictures.ToString());
if (lstEventPictures != null)
objWeb.AllowUnsafeUpdates = true;
//SPListItemCollection folders = lstEventPictures.Folders;
//folders.Add(lstEventPictures.RootFolder.ServerRelativeUrl
, SPFileSystemObjectType.Folder , folderName);
///* create a folder under the path specified
SPListItem folderItem = lstEventPictures.Items.Add(lstEventPictures.RootFolder.ServerRelativeUrl,
SPFileSystemObjectType.Folder , folderName);
///* set the folder name and update */
//folderItem["Title"] = folderName;
folderItem.Update();
lstEventPictures.Update();
objWeb.AllowUnsafeUpdates = false;
catch (Exception ex)
Utility.SPTraceLogError(ex);
Help me to resolve. Thanks in advance.Hi DK,
You can use below mentioned code to add folder in any of your library. You need to changes little bit code as per your requirement.
/// <summary>
/// Provide utilities methods related to folder management
/// </summary>
public static class SPFolderUtilities
/// <summary>
/// Ensures the specified folder exists.
/// </summary>
/// <param name="list">The list where to create the folder.</param>
/// <param name="subFolderPath">The sub folder path.</param>
/// <returns>
/// The existing <see cref="SPFolder"/> or a newly created if it did not exists.
/// </returns>
public static SPFolder EnsureFolder(SPList list, string subFolderPath)
Contract.Requires<ArgumentNullException>(list != null);
Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(subFolderPath));
if (!IO.SPPathUtilities.IsFileOrFolderNameValid(subFolderPath, true))
throw new ArgumentException("Invalid characters in the file or folder name", "subFolderPath");
var folderPaths = subFolderPath.Split('/');
var currentFolder = list.RootFolder;
for (int i = 0; i < folderPaths.Length; i++)
currentFolder = list.ParentWeb.GetFolder(currentFolder.Url); // hacky refresh
var subFolder = currentFolder.SubFolders.Cast<SPFolder>().FirstOrDefault(f => string.Compare(f.Name, folderPaths[i], true) == 0);
if (subFolder == null)
var newFolderItem = list.Items.Add(currentFolder.ServerRelativeUrl, SPFileSystemObjectType.Folder, folderPaths[i]);
newFolderItem.SystemUpdate();
subFolder = newFolderItem.Folder;
currentFolder = subFolder;
return currentFolder;
And here is the specifc code that you can use for Picture library only
Question
Vote as helpful
0
Vote
yes the code sample provided by you is to create a image library and then to add a folder to it but i'm not sure with the string.empty being passed to list.items.add. i would still recommend to use the solution suggested by me. to check if library exists or
not what you have to do is
SPSite _MySite = new SPSite("SERVERIP");
using (SPWeb currentweb = _MySite.OpenWeb())
SPList imageLib = currentweb.Lists["NewImages]
if( imageLib == null)
Guid listId = currentweb.Lists.Add("NewImages", "Picture Library", SPListTemplateType.PictureLibrary);
imageLib t = currentweb.Lists[listId];
SPDocumentLibrary
_MyDocLibrary =
(SPDocumentLibrary)
imageLib ;
SPFolderCollection _MyFolders = _MyWeb.Folders;
_MyFolders.Add("http://adfsaccount:2222/My%20Images/" + <<subfolderName>> + "/");
_MyDocLibrary.Update();
I hope this is helpful to you, mark it as Helpful.
If this works, Please mark it as Answered.
Regards,
Dharmendra Singh (MCPD-EA | MCTS)
Blog : http://sharepoint-community.net/profile/DharmendraSingh -
Hello,
I am facing a wired issue with Picture Libraries in SharePoint.
We created a custom field and added it to UserInfo list, the column based on custom field lets user upload their personal images to a Picture Library with the name <User ID>.<Image Extension> e.g. 1.jpg where UserID is internal Listitem ID of the UserInfo list and set its URL to the field value which we use to display the image on our custom user profile and some other WebParts.
If the user uploads a different image, it will overwrite the existing one it keeping the same name.
The field worked perfectly with sites using widows Based authentication, but as we move the field to sites with form based authentication we find that the field is able to upload the image properly first time but on each successive upload, although a new image gets uploaded with the name userid.imagextension and is shown in the allitems.aspx page in the thumbnail view and in the picture preview on the dispform.aspx page, but the link next to the name field and the image shown on clicking the preview points to the old image.
To put it other way
https://<Web URL>/Picture%20Library/_w/Upload_jpg.jpg
https://<Web Url>/Picture%20Library/_t/Upload_jpg.jpg
Would show the updated image
but the actual URL
https://<Web Url>/Picture%20Library/Upload.jpg
points to the old image
what’s even more strange is that even after deleting the image the url still shows the old image at
https://<Web Url>/Picture%20Library/Upload.jpg
I confirmed the same by actually repeating the same exercise on a picture Library in the User Interface
Uploading an image say upload.jpeg in the picture library using SharePoint interface.
Then uploading a different jpeg image keeping the same name upload.jpeg again in the picture library.
In allitems.aspx thumbnail view and on dispform.aspx page preview filed image now show the newly uploaded image but when you click the preview image or click the link in the name field value it takes you back to the old image.
I have seen this issue on environment where we have enabled form based authentication and the issue is not seen on another server where we have wss with windows based authentication.
Has anyone noticed such behavior and is there any workaround to that!
Thanks & Regards
Saurabh RustagiAll,
I had the same issue.
In my case, Blob Cache was enabled for the web application in which the image issue was occuring.
I cleared blob cache, and after doing a hard refresh of my browser, the correct image was then displayed.
To clear blob cache, do the following:
Navigate to:
http://yourwebapp:port/yoursite/_layouts/objectcachesettings.aspx
Select: "Object Cache Flush" and "Force all servers in the farm to flush their object cache" check boxes
Click the OK button
Hope this helps. -
Add image to iPhoto library doesn't open IPhoto screen
OS 10.4.10
Ibook G4
1.5 GB Ram
iPhoto 5.0.4
Hi,
When I want to capture a picture, whether from the web or elsewhere, I usually press control-click and a pop down window appears with various choices, one of which is "Add image to iPhoto library". Ordinarily, what happens is that the iPhoto screen appears, says "loading photos" and I see the image I have added.
Today, I have pressed control-click, "Add image to iPhoto library", but the iPhoto window didn't open. The application opened because the tool bar (menu?) at the top was iPhoto, and said so at the far left corner.
The weird thing then was that when I did get the iPhoto screen to open (and I don't remember what I did to do that) all the pictures I thought I hadn't downloaded, were there.
I admit I have been having some weird things going on in all my programs and in the finder, such as lots of the beach ball, and the stopped watch; putting the cursor into a line of text not to select but to write, and the word and/or the line got selected. Other things too. But iPhoto has been reliable up to today. I'm pleased that I /did/ get the pictures after all, but I'd like to know why the iPhoto screen didn't appear as usual.
Thanks for any help you can give,
RafaelRafael
My concern is that your issue is not with iPhoto, but a more generalised one - especially when I read
I have been having some weird things going on in all my programs and in the finder, such as lots of the beach ball, and the stopped watch; putting the cursor into a line of text not to select but to write, and the word and/or the line got selected. Other things too.
I would have that Hard Disk checked, this could be the beginnings of a hardware issue.
Regards
TD -
Cannot add images to existing collection
I cannot add images to an existing collection. When I am in the Library/navigator modus, and I grab one or more images, I can not drag them to an existing library. I do can however, drag an entire collection to a collection set, but that is not what I want.
Anyone any idea?
Lightroom 3.4.1 & windows 7
gr,
RenéRené,
I can think of three possibilities:
--You can't drag images to smart collections. Only regular collections.
--You can't drag an image to a collection set.
--You have to drag by the image, not the border.
Hal -
How do I add multiple songs to an existing playlist from the (no longer called) Library? Highlighting multiple songs and clicking the "Add to" button will only add the one with the little arrow, not all the highlighted ones! I am using the "new" iTunes.
For the moment there isn't a way for us end-users to control what is "matched" or "uploaded." That is purely a result of Apple's server-side algorithms.
To re-add multiple songs at once simply highlight all the songs you want to re-add, then right-click (or Control+click) the list and choose "add to iCloud." -
Hi,
I am trying to upload an image to SharePoint 2013 online site's Pictures Library from the Windows phone. When I click on Browse button, nothing happens. Although the same browse button in working in the chrome and allowing to select an image from the
phone library.
Please let me know if this is the known issue or any work around is available to overcome this.
Regards,
Saurabh MHi,
Although the mobile version of Internet Explorer is supported by SharePoint 2013, however, for Office 365 SharePoint Online 2013 which keeps updating all the times, there may
be some compatibility issues during the process.
As this issue is more relate to SharePoint Online, it would be more appropriate to open a thread in Office 365 forum, you will get more help and confirmed answers from there:
http://community.office365.com/en-us/forums/default.aspx
Thanks for your understanding.
Best regards,
Patrick
Patrick Liang
TechNet Community Support -
Hi All,
I have a picture library with images in sharePoint, now i want display that images in sharepoint webpage as a webpart.
i have displayed the all the images as a webpart.
Now i want to enable thumbnail on that images and when i click the thumbnail of the image, it will be dilplayed as large image.
How can i do this, any help!Hi,
Please do the following to complete this task.
1) Insert the picture library as list view webpart in your page.
2)Specify the column titled Thumbnail Preview in the list view.
3) Edit the webpart and set the Toolbar Type to Summary Toolbar.
Regards,
Anurag
Maybe you are looking for
-
Dear All I am facing problem with the aging policy in iplanet messaging server.My aging policy is not working Please find the below information for your reference 1) bash-2.03# ./imsimta version iPlanet Messaging Server 5.2 Patch 1 (built Aug 19 2002
-
Any email folder that isn't downloaded by thunderbird causes the entire program to lag extremely bad. I can't read emails, access emails or do anything till downloading is done. Is there anything I can do to help the program perform better?
-
Passport screen freezes after a long call
Hello, I've got my PassPort since fall october. Although I am quite happy with it, I have noticed that after a long call, say 15min or more, the screen becomes slowly responsive. It doesn't fully freeze, though it is very slow to bring back the unloc
-
Max-beans-in-cache, cachefullException, outOfMemoryError
Hi, I am trying to find the best way to find the numbers to be set in max-beans-in-cache for entity beans. I have a stateless session bean through which I access the entity beans. If I don't set any value for this property, in some query which will r
-
1) I have entered documentation information in to my vi and can see it in requirements gateway. When I export it ot DOORS, it gets added to the bottom of the objects in DOORS. I am useing a company template in DOORS and need my vi documentation to co