Copied to clipboard

Flag this post as spam?

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


  • JoskerVemeulen 68 posts 262 karma points
    Jun 21, 2019 @ 14:49
    JoskerVemeulen
    0

    Ad Image in HTML editor - cropsize

    I have a html grid(grid layout) where the client can add images. So far so goed. ;) The client uploads 2000x2000 dimension images. So I need cropped versions on my page (500px max). How do I go about this?

  • Marc Goodson 2155 posts 14408 karma points MVP 9x c-trib
    Jun 22, 2019 @ 21:01
    Marc Goodson
    0

    Hi Josker

    The view responsible for displaying an image in the grid is located

    /views/partials/grid/media.cshtml

    and the configuration for the grid editors is located here

    /config/grid.editors.config.js

    If the config for the Media item contains a width and height size, then the images inserted will be resized to fit eg:

    ,
        {
            "name": "Image",
            "alias": "media",
            "view": "media",
            "icon": "icon-picture",
            "size": {
                "width": "500",
                "height":"500"
            }
        },
    

    you can also set a focalPoint, with 'top' and 'left' position to cause the image to be cropped.

    or create your own config entry and corresponding view (mapped via alias) that has your own implementation of cropping/resizing the image.

    regards

    Marc

Please Sign in or register to post replies

Write your reply to:

Draft