Koala_cropped_1

Make Sitecore deliver images which fits the screen, part 2

This is the second part of a mini-series where I show how you can make Sitecore deliver images that fully support a responsive web design. See the first post here if you haven’t read it already. In this part I will show how to make Sitecore center-crop images through the media handler using query string parameters. The concept is basically that you call the media handler with specific querystring parameters that will make Sitecore center-crop the image. Similar to the out-of-the-box Sitecore image parameters. ...

September 8, 2014 · 7 min · alc
JPEG quality compression Sitecore

Make Sitecore deliver images which fits the screen

When implementing a responsive design the size of images is almost always an issue. You want the images to be resized server-side so they fit the screen. Primarily for performance but also to please Google Page Speed. Sitecore enables us to set the width and height dynamically by sending query parameters to the media handler. My colleague Brian wrote this nice post where he explains the basic out-of-the-box Sitecore image parameters. ...

September 4, 2014 · 3 min · alc
markdown_preview

How to use a subset of markdown in Sitecore text fields

This is my first blog post for some months now so I’ll start somewhat easy. I attended a design presentation meeting this Friday where the customer presented a nice and simple design based on bootstrap for their new website. All was great about the design but then I noticed something funny about the spot headlines used in the design. The headlines looked somewhat like this: This is what a headline could look like Notice how the headline uses a slim text whilst some of the words are bold, also notice the irregular line-break. ...

August 17, 2014 · 5 min · alc
crunchpng

Crush png in Sitecore

This post describes a module to crush png in Sitecore which can be downloaded from Sitecore MarketPlace and the latest version of the code is also available free on github. Continuing my fight with Google Page Speed. .NET does not offer an approach for compressing png files other than the default compression. This makes it hard to please google page speed automatically since one of their checks is if the images on a site are losslessly compressed. ...

October 26, 2013 · 6 min · alc

Changing a PDF on the fly using Sitecore Media Request

Some time ago I had a fun challenge for a customer. They wanted a legal notice pdf to be appended to all PDF files which was downloaded from specific parts of the media library on the fly. They also wanted to be able to update the legal notice pdf and use a different one for different parts of the media library. The same concept could also be used for adding a watermark to a pdf or maybe removing all above the first three pages for non-authenticated users etc. ...

October 23, 2013 · 3 min · alc

301 URL mappings in Sitecore done easy

When migrating an existing website to a new Sitecore solution the customer typically want to retain their Google Page rank earned by links pointing to their site. To transfer the page ranks of old pages to new ones the response needs a 301 permanent redirect status code and then redirect to a new page which content some what corresponds to the content found on the old url. A simple example ...

October 14, 2013 · 4 min · alc

Minify html in Sitecore

Pleasing Google Page Speed Minifying resources such as Javascript and CSS is becoming common practice nowadays and something which just should be done with no questions asked. The reason for minification is both to reduce the payload and to reduce the number of requests made by the browser to the server. This makes the page load faster thus more responsive. Google rewards pages with a quick load time in their search results as well which makes it one of the key points which are checked by their analysis tool called Google Page Speed ...

October 13, 2013 · 5 min · alc