Image cropping failing in Page Builder

Impacted feature

Images in Page Builder, when cropping some images the crop fails to actually be set. For this specific image the crop moves down a few pixels every time you re-open the cropping tool. If you try and choose the bottom of the image as the correct crop this gets ignored.
https://jam.dev/c/2a19811c-03f8-4ee4-913b-a8ebe3c987d9

What steps have you taken to resolve this issue already?

Tried on multiple devices with different internet connections and users.

Tried deleting the chosen image and re-adding to the slice.

Errors

We are unsure of the error occurring but it looks like there is a timeout happening somewhere, shown in a Sentry request.

Your Role

Website developer

Steps to reproduce

  1. Add a large image to your media library.
  2. Create a slice with an image field.
  3. Add the slice to a page and populate the image field with a large image.
  4. Crop the image to the bottom and see if the crop actually gets used in the image placeholder and on your site.

Hey @starsky,

Thanks for raising this, and welcome to the community! We're aware of this bug, very sorry for the inconvenience. We have a bug ticket open here for it: https://prismic.atlassian.net/browse/BT-337. I've added your post to it for visibility and so you can be kept informed of a fix.

As you can see for now the only workaround is to manually crop/resize images in an external editor (e.g. Photoshop) and re-upload. There's a suspicion this is also size-related, so you could try seeing if reducing the image's size fixes it for you.

Hi @Ezekiel

Through some trial and error we figured out that this is size related, we found this note in the imgix documentation:

  • Canvas size: The maximum supported canvas size is 8192px by 8192px. If your image is larger than the limit, it will be resized to fit within the limit before any other Imgix operations occur. If you require a larger canvas size, please contact us.

The images we were having issues with were all above this size. We resized down to 8192x8192 and reuploaded which fixed it.

If you can confirm this wasn't just a coincidence, it would be a nice UX improvement to give some sort of warning to users when they upload images above this limit.

2 Likes

Hey @connor, can confirm, this checks out! Thanks for pulling the Imgix documentation, this is really useful to document it on our end as well. I agree with you re: the UX improvement, I'll make sure this is added to a feature request. Thanks a lot for raising this!

@Ezekiel No worries, happy to help!

1 Like