Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • zell 37 posts 90 karma points
    Apr 23, 2015 @ 04:04
    zell
    0

    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

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 23, 2015 @ 05:23
    Jan Skovgaard
    0

    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

  • Evangelos Lolos 7 posts 98 karma points
    Dec 30, 2015 @ 10:28
    Evangelos Lolos
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft