Image upload and crop

Hi,

editors ask me if it’s possible to upload an image, crop it to an exact dimension and then save. Those dimensions are dictate by Art director.

I setup an asset field with “Accept only specified image dimensions” -> “Exactly” validation.

Now editors are forced to upload assets to media manager, crop it and then link the image into entry. It’s possibile to setup a field with upload & crop or I need an UI-extension?

Thanks,
Vincenzo

Hey @vmilone,

Assets are always uploaded in their own view, where you specify the title, description and actual file (here: image).
Once you’ve uploaded the image, you can click on the edit button that appears when hovering over the image to spin up a small in-browser image editor, where you can (beside other) resize & crop your image to your desired needs.

After saving you can hit the back button top-left corner (the one in our UI, not the browsers’ back button) and the cropped image is linked to the entry you came from. No need to first upload it before creating the entry.

Not sure how an UI extension could make it easier, except for having pop-over. But maintaining this outweighs the advantage in my personal opinion.

Hope this helped,
Stephan

1 Like

Hi @stephan.schneider,

thank you.

Two questions:

  1. When the editor click on button “Create new asset and link” goes to another screen. So they can’t see the help message about the image dimension that I put under the asset field. They must remember the exactly numbers.
  2. The image editor crops the original file? It’s possibile to create a cropped copy? For example, in the “news” contentType I have 3 assets: small, medium and large. It’s the same image with 3 different crops. Actually the editor must upload the image tree times.

For the first one you’re right, those help texts won’t be visible on the Asset screen.

For the second question, I think you can circumvent uploading the image three times by utilizing our Images API, which is exactly designed for this usecase.
In fact, there’s a dedicated section for resizing & cropping.

Let me know what you think about this,
Stephan

Hi,

it’s exactly what i’d suggested to my Editors, but they said: “We don’t trust automatic crop”.

I’m thinking to build an UI-extension on top of asset-array field with React.

Thank you,
Vincenzo