Wp-calypso: Image block "Image Size" drop-down not working

Created on 29 Jul 2019  路  15Comments  路  Source: Automattic/wp-calypso

Steps to reproduce

  1. Start a new post.
  2. Add an Image Block and insert an image.
  3. Click on block and try to change the Image Size.

What I expected

I expected to select a different image size, such as Medium, Full Size, Thumbnail, etc.

What happened instead

I was not able to select any other sizes. The chosen size is ignored and the default size remains.

Browser / OS version

Chrome, MacOS 10.14.5
User also reported: Firefox 66.0.5 and Safari 12.1.1, both on Mac OS Mojave 10.14.5.

Screenshot / Video

https://cld.wthms.co/vLTjyG

user-report

2222802-zen

Editor [Goal] Gutenberg [Pri] High [Type] Bug

All 15 comments

I've noticed this as well. It's stack with the large option all the time.

I had a customer come in with this issue as well: #14422315-HC

I was able to replicate on my test site with multiple themes.

Follow up ticket #2254559-ZD

I can reproduce this on my test sites.

As a workaround users can still use the resizable box controls:

Aug-08-2019 08-22-03

Changing the size using the _Image Dimensions_ inputs works too:
Screen Shot 2019-08-08 at 08 23 43

Letting the customer in 2222802-zd know that we're still working on this.

I took a quick look at this today and verified that Gutenberg doesn't resize the images because the media_details.sizes property of the image is empty:

Screen Shot 2019-08-17 at 15 36 59

Seems that we're overriding the intermediate_image_sizes filter in WP.com with an empty array (see wp-content/mu-plugins/wpcom-media.php):

// disable automatic creation of intermediate image sizes

function wpcom_intermediate_sizes($sizes) {
    return array();
}

add_filter('intermediate_image_sizes', 'wpcom_intermediate_sizes');
add_filter('intermediate_image_sizes_advanced', 'wpcom_intermediate_sizes');

Maybe Photon folks can help us get some context for why this is here; then we can either fix or hide the controls if necessary.

This might be the same issue as https://github.com/Automattic/wp-calypso/issues/35578

Basically:

  • Add an image block, and insert an image through the Media Library.
  • Change the block alignment to Full Width.
  • Notice that the image looks low res.
  • Try switching to the code editor.
  • Notice that the image URL has the (Photon?) ?w=640 query param.

Fix underway in D31752-code.

This should be fixed now that D31752-code has landed.

D31752-code has been reverted after causing infinite loops in WP.com

New fix attempt in progress in D31880-code

Just noting another case in here until the fix is out - 2298791-zd

Fixed in r195806-wpcom.

Thank you!!

Was this page helpful?
0 / 5 - 0 ratings