Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image size select defaults to 'Thumbnail' when an image is added but it's the full size image #21681

Closed
ninetyninew opened this issue Apr 17, 2020 · 10 comments
Labels
[Block] Image Affects the Image Block [Type] Bug An existing feature does not function as intended

Comments

@ninetyninew
Copy link

Describe the bug
When using the image block if you add an image then the image is added to the block at full size, which is fine but the settings panel's Image Size select field shows the image size as Thumbnail. Maybe if no size is selected this should be "Not set/custom" or similar.

To reproduce
Steps to reproduce the behavior:

  1. Add an image block
  2. Select an image
  3. In the block settings view the Image Size select field
  4. The selected option is Thumbnail

Expected behavior
As the image was added at full size don't show the select field value as Thumbnail, as no specific size is set maybe Custom or Not Set.

Screenshots
If applicable, add screenshots to help explain your problem.

Editor version (please complete the following information):

  • WordPress version: 5.4 / Gutenberg included in core
@ghost
Copy link

ghost commented Apr 18, 2020

Perhaps related to the bug I raised in #21650 but mine is specifically related to the gallery block?

@talldan
Copy link
Contributor

talldan commented Apr 20, 2020

This does sound similar to #21650 and similarly I'm not able to reproduce the problem. I left a comment there about providing some extra info that would be helpful: #21650 (comment)

If you're able to provide that info as well @ninetyninew, that would be great.

@ninetyninew
Copy link
Author

ninetyninew commented Apr 20, 2020

@talldan

Image in code editor: <!-- wp:image {"align":"center","id":116,"sizeSlug":"large","linkDestination":"custom","className":"image-fancy-right"} -->

Setting shown in editor:

image

Plugins enabled on site are Font Awesome, Rank Math and Contact Form 7, disabling these doesn't make any difference.

@talldan talldan added [Block] Image Affects the Image Block Needs Testing Needs further testing to be confirmed. labels Apr 20, 2020
@mrwweb
Copy link

mrwweb commented Apr 21, 2020

I just ran into this on two different sites in an hour. Both running WP 5.4 with no Gutenberg plugin.

@annezazu
Copy link
Contributor

annezazu commented Apr 23, 2020

Here's my setup:

  • WordPress 5.4
  • Gutenberg 7.9.1
  • PHP 7.3.16
  • MacOS 10.14.6
  • Chrome 81.0.4044.122

Large Image (790 x 1420 ) Test: Unable to replicate

Video of my test: https://cloudup.com/cS2XhFfPFAi

I wasn't able to replicate the described issue both with and without the Gutenberg plugin installed.

✅Medium Image (300 x 177) Test: Able to replicate

I was able to replicate the problem with images of this size!

Screen Shot 2020-04-22 at 5 05 04 PM

Small Image Test (137 x 103): Unable to replicate

As a final test, I tried using a very small image and found this defaulted to "Full Size" in the Image Size settings

Screen Shot 2020-04-22 at 5 00 41 PM

Based on the recent dialogue in #21650 it seems this might be related to file size in particular this "in between"/medium size.

Removing needs testing label and changing to bug.

@annezazu annezazu added [Type] Bug An existing feature does not function as intended and removed Needs Testing Needs further testing to be confirmed. labels Apr 23, 2020
@supernovia
Copy link

Just noting I ran into this today. The size setting doesn't seem to do anything.

@jerrysarcastic
Copy link

Also noting that this issue popped up for me today, both with a site owner that cannot change image sizes (thumb, medium, large, etc.) with no change.

Tried this on a test site and had the same issue. When I add an image, it is not possible to change the size of the image using those presets. I recorded a screencast of the issue here: https://d.pr/v/MdWbBs

As shown in my screencast, the Gutenberg markup is updated to reflect the correct size, but no change is seen in the editor view, nor on the live site when published.

@zdenys
Copy link

zdenys commented Jun 16, 2020

The issue is present on WordPress.com sites too: Automattic/wp-calypso#43197

After some more testing, I can see the issue on a fresh install of https://jurassic.ninja/ + latest Gutenberg Plugin. Here's the screencast: https://d.pr/v/cOXxJF

On https://jurassic.ninja/ site without Gutenberg Plugin the Image Block has no issues: https://d.pr/v/jEUheH

@razvanpapadopol
Copy link

The broken image size preset selector was fixed in #23342 and will be included in the next release.

@paaljoachim
Copy link
Contributor

The error is back.
#27198

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Image Affects the Image Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

10 participants