I've been able to create a custom property editor that accepts an external image url, validates it and stores it in the same format as the built-in Umbraco image cropper. That is, it stores everything as JSON, including the absolute URL as the image src and crop information.
It was really easy to implement this, all I had to do was to have a look at the image cropper source code and adapt it so it accepts a URL rather than a file to upload.
Unfortunately, I cannot advise about cropping the external URLs using Umbraco, as my solution depended on the image server also having ImageResizer installed, so that the URLs generated by the .GetCropUrl() method worked in the expected way.
ImageCropper on images stored externally
i'm a little confused by imagecropper:
1. i assume it will only work on images stored in the CMS?
2. Can i pass in an external image url and crop the image on the fly?
thanks
Hi Zell
Since the cropper is built on top of the Image Processor by James South I think that you should be able to make crops of external images using image processor as documented here http://imageprocessor.org/imageprocessor-web/imageprocessingmodule/crop/
In regards on how to use image cropper on internal Umbraco images you can see the documentation here https://our.umbraco.org/documentation/Using-Umbraco/Backoffice-Overview/Property-Editors/Built-in-Property-Editors-v7/Image-Cropper
Even though cropping of external images are not in the scope of this article I think that perhaps it might still be useful providing information about how to crop external media images? http://24days.in/umbraco/2014/all-your-images-are-belong-to-umbraco/
Anyway I hope this helps a bit :)
/Jan
Hi Zell,
I've been able to create a custom property editor that accepts an external image url, validates it and stores it in the same format as the built-in Umbraco image cropper. That is, it stores everything as JSON, including the absolute URL as the image src and crop information.
It was really easy to implement this, all I had to do was to have a look at the image cropper source code and adapt it so it accepts a URL rather than a file to upload.
Unfortunately, I cannot advise about cropping the external URLs using Umbraco, as my solution depended on the image server also having ImageResizer installed, so that the URLs generated by the .GetCropUrl() method worked in the expected way.
is working on a reply...