Copied to clipboard

Flag this post as spam?

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


  • Wojciech 5 posts 95 karma points
    6 days ago
    Wojciech
    0

    Images are not rendered in the size defined in cropper. Umbraco 13

    Hey, i pass model down to partial view and in partial view i want to render cropped image. I followed the documentation and used .GetCropUrl("alias here");

    Links generated by the GetCropUrl() seems to be fine, however the dimensions are not applied for some reason. Help me please i cannot solve this.

    In addition i wanted to say that I've changed the directory of storing medias.

    Here are the photos:

    Partial View enter image description here

    Website with links enter image description here

    enter image description here enter image description here

  • Adriano Fabri 467 posts 1631 karma points
    6 days ago
    Adriano Fabri
    0

    Hi Wojciech, first of all I would like to suggest you to update your website to at least Umbraco v10 which is much more performing and powerful then v9.

    In the past I had the same problem with Umbraco v11.5.0 using the "ImageCropper" datatype.

    My solution has been to use, instead of image cropper, the "Media Picker" datatype configured with the crops.

    You can find information about the datatype at these links:

    Media Picker 3 for Umbraco 9

    Media Picker 3 for Umbraco 10+

    I hope this help you.

    Adriano

  • Wojciech 5 posts 95 karma points
    6 days ago
    Wojciech
    100

    I use Umbraco 13. I managed to solve the problem.

    This line of code solved it for me.

    app.UseImageSharp();
    

    In Program.cs just right above

    app.UseStaticFiles(...);
    

    IMPORTANT: Seems like the issue was triggered by having media source directory out of wwwroot.

    By the way it didn't matter whether i used Image Media Picker or Image Cropper, the issue persisted anyway and i tried all of the variations.

  • Huw Reddick 1810 posts 6223 karma points MVP c-trib
    6 days ago
    Huw Reddick
    0

    check that the classes you are using are not overriding the image sizes

Please Sign in or register to post replies

Write your reply to:

Draft