Kentico ImageEngine Integration

Sign up for an ImageEngine account in order to get a Delivery Address for your optimized images.

Below, we assume that is your delivery address and that it is correctly set up in the DNS. You can of course use a delivery address on the shared domain name too.

In your web.config file within <system.webServer> add the following:

        <rule name="Rewrite Media to CDN" preCondition="IsHTML">
            <match filterByTags="Img" pattern="/getmedia/(.*)" />
            <action type="Rewrite" value="{R:1}" />
        <rule name="Rewrite Media Files to CDN by path" preCondition="IsHTML">
            <match filterByTags="Img" pattern="/media/(.*)" />
            <action type="Rewrite" value="{R:1}"/>

Make sure to change in both places in the code above

For more information on IIS rewrites and configuration examples, see the IIS Rewrite module documentation.

# CSS Background Images

If you are using background images in your CSS, you will need to use the absolute path with the CNAME domain in order for it to properly optimize.

There are also plugins in the marketplace that enable this functionality, but they do not always support the latest version of Kentico: