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
When using Image Cropper on a content node, it is only possible to upload a image from local machine and not choose a image from the Media Section.
Using Media Picker data type instead, I can both upload a local image and choose a image from the Media Section.
Am I missing something, or what is the reason for this?
When we chatted at CG, the solution was to change your Media "Image" media type to use an Image Cropper instead of an Upload property editor....
I remember, and I did that, which makes the Image Cropper available from the Media Section, but it doesn't solve our issue.
Eg. I create a article doc type with a Image Cropper property.
From the content tree I create a new article, click "Upload" in the Image Cropper, and I can only choose files from local disk, not from the Media Section. When you use a Media Picker, you get a pane on the right with your Media Section and the option to upload from local disk.
By using the Image Cropper, the result is I can not reuse pictures on multiple content nodes, but have to upload and store them each and every time.
You need to just use the "Media Picker" in your content items. not the cropper.
You add the crop sizes to the main image cropper that you changed in the media section.
Then in your view you can get the image in any of the crop sizes.
The only disadvantage / quirk to this is that you have to then set the crop sizes against the image in the media section and can't do it in the content area. I don't see that as a massive issue though as media is easily managed and the default crop willl get used most of the time.
I think I originally found the explanation from another post which mentioned this video
Its pretty long but think you can skip a bit to find the important part.
What I wanted was to use the Image Cropper directly on a content node, but with the possibility to to have the right pane like with the Media Picker, where I can choose already uploaded images from the Media Section.
It seems like it's not possible though.
A workaround as I understand it, is to set media type; image to Image Cropper, and on the content node you'll have to use the Media Picker instead. The disadvantage is you can not crop from your content node, and have to go to the media section, which changes the workflow our editors are used to.
The solution can be achieved by:
You'll now have a Media Picker on your content node and can both upload a image or choose a already existing image from the Media Section. To adjust the crops, you'll have to go to the Media Section and find the corresponding image to achieve that.
In your Razor view you render the image this way:
<img src="@Umbraco.TypedMedia(node.GetPropertyValue("image")).GetCropUrl("umbracoFile", "main")" alt=""/>
Where as before - IF you used the Image Cropper directly on your content node, you would render the image this way:
<img src="@node.GetCropUrl(propertyAlias: "image", cropAlias: "main")" alt=""/>
Note that if you in the first place used the Image Cropper directly on your content nodes, created a lot of content with images picked via the Image Cropper, and later change the property on your document type to use Media Picker instead, you will have to republish your content nodes, which makes your nodes no longer reference to the old images. If you don't republish, trying to render your image with Umbraco.TypedMedia (example above) will result in a null pointer exception.
This literally means you'll have to go through all your content nodes and choose the images again from the Media Section.
Soution works, but I don't understand why I should not be able to use the Image Cropper directly on a content node, and have the possibility to choose a already uploaded image? @shannon
thanks for explaining in details your finding of how to use the image cropper with the option to get images from the media library as well as the local drive.
It works now as we need it.
Thanks a lot.
Right, so you want a media picker where you can pick or upload (AND then edit/crop) in the dialog, correct?
This is not possible currently afaik, you can log a feature request for this or would have to create a custom property editor to achieve this.
Exactly Shannon :)
That was what I thought, but couldn't see the reason behind. Might have to do one myself.
The reason the cropper is built the way it is - eg. not supporting pointing it at other images in the media library is that each image should really only exist once, and then be cropped / resized as needed.
So, you upload a single image to the cropper, configure sizes and center. Then this single image is used everywhere - making it a responsive image.
The cropper is not meant to be a cropped version of some other file, it is meant to be one file + cropping data.
So one image, multiple crops / uses.
It doesnt solve what you want to do, but that is how it was thought out to work :)
Thanks for explaining. I get your way of thinking and the ideas behind, but let's imagine the cropper did reference to a image in the Media Section. Uploading a image from the content node, through the cropper, should then save the image in the Media Section, with associated crops in media library on disk.
The cropped images should only live one place, as should the original image, and be accessible through the cropper on my content node, making it possible to change them (center point / sizes) both on my content node and in the Media Section.
I literally want to achieve what you describe, but having the possibility to upload / adjust my image and crops from a content node - only having the images to live one place (Media Section) though.
Makes sense? :)
Totally for this change - the lack of ability to set the focal point from the content node is really disruptive to the way editors are used to working.
It's forced me to avoid using image cropper in favor of imagegen in many cases.
It would be great if an editor could have a choice of picking from existing media OR uploading new media...and then set the focal point...all in one place. Forcing them to switch to the media section simply to add the focal point is awkward.
Still haven't seen anyone log a feature request on the tracker for this though ;)
That's because I created it as a bug in the first place. :)
That's the same link as this topic ;)
Found the right link though: http://issues.umbraco.org/issue/U4-6223
Doh, I'm asleep ;)
Anyone aware of any movement or general solution to this problem as of 7.6? We keep a folder in our repo's specifically for the cropper since you can't choose from the media library.
Or any 3rd party package that has made this process more consistent to what editors are expecting?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted