Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
As documentation about the new cropper is a bit hard to find i have a couple of questions, someone might be able to answer
1. is it possible to use unnamed crops using dimensions instead. Kinda' like cropup did it?
@image.GetCropUrl("umbracoFile", 200x200)
2. Does the new cropper cache the crops on disk?
3. Is it possible to disable upscaling on the crop?
@image.GetCropUrl(100,100) (assumes umbracoFile)
@image.GetCropUrl(width: 100, height:100, furtherOptions: "&upscale=false")
If you are using Dynamics (CurrentPage), it's slightly different, I can provide examples if you let me know
You need to be using the latest nightly for these options to work correctly http://nightly.umbraco.org/umbraco%207.1.0/
I will write the documentation next week :-)
AWESOME! Thanks
Dynamic examples would be nice though :)
Ok, here is an example of how to access the GetCropUrl method that has every option while using dynamics
@{ var homePage = CurrentPage.AncestorsOrSelf(1).First(); } <!-- Features --> <section class="is-features"> <h2 class="major"><span>Wonderful featured pages</span></h2> <div> <div class="row"> @foreach (var feature in homePage.umbTextPages.Where("featuredPage")) { <div class="3u"> <!-- Feature --> <section class="is-feature"> <a href="@feature.Url" class="image image-full"> <img src="@ImageCropperTemplateExtensions.GetCropUrl(mediaItem: feature, propertyAlias:"Image", width: 100, height: 100, furtherOptions: "&upscale=false")" alt="" /> </a> <h3><a href="@feature.Url">@feature.Name</a></h3> </section> <!-- /Feature --> </div> } </div> </div> </section>
Of course most of time you do not need this options so you can just do the following with dynamics:
<img src="@feature.GetCropUrl("home")" alt="" /> <img src="@feature.GetCropUrl("umbracoFile","home")" alt="" />
First one assumes your Cropper property alias is "umbracoFile", second one you can use when it is called something else e.g. <img src="@feature.GetCropUrl("image","home")" alt="" />
<img src="@feature.GetCropUrl("image","home")" alt="" />
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
A couple of cropper questions...
As documentation about the new cropper is a bit hard to find i have a couple of questions, someone might be able to answer
1. is it possible to use unnamed crops using dimensions instead. Kinda' like cropup did it?
2. Does the new cropper cache the crops on disk?
3. Is it possible to disable upscaling on the crop?
@image.GetCropUrl(100,100) (assumes umbracoFile)
@image.GetCropUrl(width: 100, height:100, furtherOptions: "&upscale=false")
If you are using Dynamics (CurrentPage), it's slightly different, I can provide examples if you let me know
You need to be using the latest nightly for these options to work correctly http://nightly.umbraco.org/umbraco%207.1.0/
I will write the documentation next week :-)
AWESOME! Thanks
Dynamic examples would be nice though :)
Ok, here is an example of how to access the GetCropUrl method that has every option while using dynamics
Of course most of time you do not need this options so you can just do the following with dynamics:
First one assumes your Cropper property alias is "umbracoFile", second one you can use when it is called something else e.g.
<img src="@feature.GetCropUrl("image","home")" alt="" />
is working on a reply...