The Fabrik Media Service provides advanced media manipulation when building applications using Fabrik API.
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.
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:
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:
For example if we wanted to resize the image above to 400px wide, we would change the URI to:
@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") ) )
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 email@example.com