Copied to clipboard

Flag this post as spam?

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


  • MadsInovo 13 posts 84 karma points
    Aug 22, 2016 @ 17:18
    MadsInovo
    0

    Umbraco resize my picture

    Hello

    I have an image there is 1920*1440 px. I have made a 1/3 - 2/3 grid, where the picture has to be in the 1/3 grid. When I put in the picture through Umbraco, the picture is sized down to 153 * 32 px. I have a CSS class on the picture, but I tried to delete all the CSS I had, and the picture is still very small.

    I am out of possibilities now. Does anybody know what that could be? I am thinking if there is a function in Umbraco somehow, where a picture is automatic resizing? I tried with different pictures, but it is the same result. I also tried without the CSS, but same result.

    When I make a fullsize grid the picture is normal, and also if I set the picture in a 2/3 of the grid. But I would like the picture just to be a little bit bigger than it is now in a 1/3 grid.

    I hope somebody could have an idea?`

    Best Regards

  • Marc Goodson 2155 posts 14408 karma points MVP 9x c-trib
    Aug 23, 2016 @ 01:06
    Marc Goodson
    0

    Hi MadsInova

    Have a look in your /config/grid.editors.config.js file

    When you insert the image into the 1/3 grid, what is the name of the editor that you use to insert, and is that listed in the /config/grid.editors.config.js file? and if so is there a 'config' setting for 'size' that might be restricting your width and height ?

    eg

    ,
        {
            "name": "Image wide cropped",
            "alias": "media_wide_cropped",
            "view": "media",
            "render": "media",
            "icon": "icon-picture",
            "config": {
                "size": {
                    "width": 1920,
                    "height": 700
                }
            }
        },
    

    The /views/partials/grid/editors/media.cshtml contains the code that renders the image in a grid, and this passes to url of the image via the querystring these width and height settings, that cause the image to actually be resized on the serverside.

    regards

    marc

Please Sign in or register to post replies

Write your reply to:

Draft