I'm trying to add images to a post with the following work flow using the Gutenberg editor on version 5.1.

Add an image block -> select upload -> select image.

The image is uploaded to the page and the media library but is cropped.

i.e Cropped

If I follow a DIFFERENT workflow: Add image block -> Media Library -> Upload Files -> Select files -> Select images

The image is uploaded and added, but only scaled down in size, which is what I want.

Scaled upload

I've tried unchecking "Crop thumbnail to exact dimensions (normally thumbnails are proportional)" in media settings, and deactivating Smush, but no difference.

Changing the Image Size from Full Size, Large, Medium or Thumbnail makes no difference either as the copy of the image saved to the Media Library is itself cropped.

Can anyone help me so any images uploaded are not cropped? In the classic editor there was no problem.

I'm asking on behalf of someone not technical so I want to fix it so either upload method works fine.


Edit for Tom J Nowell's comments:

Here's a screenshot of the media library showing the cropped image (on the left), when I do "Add an image block -> select upload -> select image"

The image on the right has been uploaded from the WP Admin menu media library and is fine when added to posts.

enter image description here

Changing from Full Size to Medium, does make the cropped image appear weirdly narrower like this, but doesn't fix it, which makes me think it is the upload process causing it:

enter image description here

  • hmmm the block editor doesn't handle image editing itself, the cropping/resizing of images is done entirely by WP on upload outside of the block editor. Have you confirmed it's the file that's being cropped, and not the presentation? If you view the uploaded attachment in the media library is it cropped? What if you upload via the media library? By media library I mean the media library in the WP Admin main menu, not the modal dialog accessed via a post editor – Tom J Nowell Mar 6 at 2:41
  • Also, the full size image is the original image ( WP does not modify the full size image, and it doesn't crop it either, it's the original file as it was uploaded ). Do you have any custom edit styles? – Tom J Nowell Mar 6 at 2:43
  • If the image is uploaded via the media library in the WP admin menu, it is fine. Images that are cropped in the way I've described are cropped when viewed in the media library. I'll edit my answer to show. – damtypo Mar 11 at 22:22
  • I've tested both an extremely tall, and an extremely wide, image using the steps you provided. Both ways for both images lead to the image being scaled, but not cropped. This is on a completely fresh 5.1 install. Any other plugins activated? What theme? – tmdesigned Mar 11 at 23:34
  • tbh if this is as you described, you should be reporting it on the official WP bug tracker, not stack exchange. The JS block editor shouldn't be able to mess with the cropping of images, it just reuses the existing media library modal/code from the old editor – Tom J Nowell Mar 12 at 14:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.