How to use “Background Image Cluster” for promoted links

I’m pretty sure that most people who work with SharePoint know what promoted links are. For those of you who don’t know, these are hyperlinks that are displayed as tiles. An example of this is the Get started with your site web part.

How the items representing the tiles are created is well documented all over the net. However, one part of the promoted links is not so commonly known. This is the Background Image Cluster property.

Before we’ll get deeper into the background image cluster property, first a brief description on the way an image is displayed within a tile. Whenever you choose a background image for a tile, the image will be resized to fill up the whole tile in the best way possible. In other words, if the image is too small or too big to fit the tile, then the image will be appear stretched or shrunken, whilst taking into account the aspect ratio of the image. Let’s see how this works in real life:

Now, back to the Background Image Cluster property. If you do not want your image to appear smaller or bigger than it really is, the background image cluster property comes in handy. When set, this property will show the image’s true size. It can also help to adjust the image-position in the tile.

First things first: show the background image cluster property
To use the background image cluster property, we have to make sure we can see and fill it. To do this, open the All Promoted Links view and edit it. Scroll to the columns section and tick the checkbox for Background Image Cluster Horizontal Start and Background Image Cluster Vertical Start. Save the changes by clicking on OK.

Use real image size
If you want the image to be displayed as it actually is, you have to set a value for both background image cluster fields to 0. As a result, the image will be shown at the top left of the tile in it’s full size. In this example, the original image size was only 64px. Therefore it now appears a lot smaller than before.

You might wonder why you have to set the background image cluster fields to 0 to display the image in real size. This is because of the following reasons:
– The property is only activated when set in both fields.
– You can only use numbers, numbers equal or higher than 0 that is.
– A number higher than 0 would mess with the position of the image.

Adjust image position
The last reasoning of the previous paragraph comes into play for adjusting the image position. Here’s how it works: the background image cluster property places the image on the top left of the tile and it does so by using an absolute position. And it does so by using pixels. Thus, to adjust the position of an image, you have to fill in how much pixels you want the picture to be moved. This can either be horizontal or vertical, hence the existence of both background image cluster fields. There is one important note however, you can only adjust the image’s position to the left or to the top. In other words, the image will always be moved into a negative direction. Let me explain this with an example, where the horizontal start is 32 and the vertical start is 0.

As you can see, the image is only shown half on the left. This is because the horizontal start is 32, which stands for -32px (a negative direction, using pixels as a unit).

Microsoft uses the background image cluster property itself for the Get started with your site web part, mentioned and previewed earlier in this post. They use the same image for all tiles, only it’s placement in the tile differs.

SharePoint web part: get started with your site image set

Leave a Reply

Your email address will not be published. Required fields are marked *