Fabrik Media Service

More useful stuff from fabrik.

Welcome to the Fabrik Media Service.

The Fabrik Media Service provides advanced media manipulation when building applications using Fabrik API.

Technical Summary

The service works as a proxy to media stored in the fabrik cloud. By passing specific parameters in the media URI we are able to dynamically transform media. This includes resizing, cropping, stretching and many more.

Getting started

When you upload an image via Fabrik API you are returned the storage URI of the file. All files are stored in Microsoft's Cloud Storage platform, Azure. An example URI will look like this:

https://fabrikmedia.blob.core.windows.net/test/my-test-image.png

If you do not need to manipulate the image you can use the original URI. It will never be changed. However, if you do wish to change the image in some way you need to replace the host name (everything before the first single "/") with the following Fabrik Media Service address:

https://media.onfabrik.com/images

For example if we wanted to resize the image above to 400px wide, we would change the URI to:

https://media.onfabrik.com/images/test/my-test-image.png?width=400

Transformation Reference

You can find the complete list of supported transformation options here. An even easier approach is to use the Fabrik API Client for .NET that includes a number of helpers to easily render images.

@fabrik.DisplayImage(
    project.GetCoverImage(), img => img
	    .Resize(x => x
		    .Dimensions(featuredWidth, featuredHeight)
		    .ScaleBoth()
		    .Crop()
		)
		.Transform(x => x
		    .FlipAfter(FlipType.X)
		)
	    .Style(x => x
		    .Margin(20)
		    .BackgroundColor("000000")
	    )
)

These automatically take care of of changing the original image URI to go via the Fabrik Media Service. Internally we're making use of the excellent Image Resizer module and Fluent Extensions.

Support

We'll be adding more documentation, samples and other goodies in the future. For now, if you have any questions, please drop us an email at support@getfabrik.com