Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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?
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
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
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?
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:
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
is working on a reply...