We have noticed this many times: Sites created by SharePoint content owners using images that are way too large for web consumption. Why this happens? Well… that is easy to understand. For instance: One of our clients gets a high-res format, meant-to-be-printed image from the marketing department. He uploaded that image to SharePoint by using resize tool from the ribbon controls. Though he was trying to adjust the height and width of the image to make the page look nice, he failed because resizing does not really help to make the image size smaller. If he uploads the image somehow, there will be problem for mobile users who use slow internet connections, they will have to wait long for the image download to be completed.
The solution to this problem is in image rendition, a SharePoint Server publishing feature comes from SharePoint 2013. With this amazing feature, image additions to a library become easy and you can add them with your desired heights and widths and the benefit is you don’t have to download the image.
You require a few things to use image renditions:
1st. Publishing features activated SharePoint Server site
2nd. you will need a picture library to test. You can always create a new picture library in Settings > Site contents > Add an app or use the default library.
3rd. Turn on the Blob Caching in your web.config file
Above steps are very easy to figure out so there is no need of an illustration. Furthermore, to turn on Blob caching, just go to the SharePoint web.config file located on the physical server. Web.config file generally located in the same directory as C:\inetpub\wwwroot\wss\VirtualDirectories\80. If that sounds tricky, then you can use IIS to find the directory. Go to web.config (open with an editor like Notepad) (once you click on Save, SharePoint site will be reset by IIS, do not do this on production during peak hours) and use Control-F to find the first case of “<BlobCache”. In this line, you will get to see enabled=”false”. Just change this to “true” and click on save all.
Subsequently you can personalize the image-rendition sizes by navigating to Settings > Site settings > Look and Feel > Image Renditions. You can use the few predefined sizes there. To personalize your image, just hit on Add new item, enter a name, width and height, then hit on Save. Subsequently, when you insert images to a picture collection, you will have a rendition that matches that size that you can personalize.
To go further with the process of image renditions, go to the pictures library and upload your desired image. Once the image’s thumbnail appears in the library, hover mouse point over it and hit the ellipsis that appears in the bottom right. Then hit Edit Renditions.
Afterward, you will see all the available renditions in the form of a list and image will appear created already in different sizes. From Click to change, you can edit the cropping and sizing of the rendition. This will come up as a dashed box that is controlled to the size of image rendition; from here you can resize and move photos accordingly so that the image appears in the best possible way.
Once you are done with image rendition setup and configuration, you can choose from several size options while putting images on the publishing page. Subsequent to inserting the image and editing a page, just click the image tab from the ribbon and then select choose from the pick rendition dropdown.
As image rendition is in use in the illustration, it can be downloaded quickly. The image is actually 140px/140px, but when it comes to access, it will load in no time. Sounds cool, doesn’t it? If you want to reference the image rendition directly using code or without the ribbon then you can pass URL parameters to the image for either the RenditionID.
For instance, in the illustration below, the raw image URL in SharePoint was:
If I want to load the image rendition for 304×100, I can reference the image like this:
You can allusion an image with the height or width also, however, if there are manifold matching renditions, the first will be come again.
Image rendition is surely a handy characteristic for assisting content authors to design images that are web-friendly. This rendition is also available for videos too.
This post is brought to you by Softree Consulting
Softree Consulting employs SharePoint consultants, who are experienced in writing for a multiplicity of SharePoint verticals including technical, promotional, creative, branding content, cataloguing and ethical media comprising journalism.
With more than 10 years of industry experience these professionals have the best resources to deliver optimum results. They have been satisfying customers with some of the best SharePoint Strategies. In case you need experts for Offshore development for SharePoint 2016, we have got you covered.