WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.56k stars 4.22k forks source link

"Convert to Blocks" function of Classic Editor blocks ignores set width/height of Images #35050

Open MadtownLems opened 3 years ago

MadtownLems commented 3 years ago

Description

The "Convert to Blocks" function of Classic Editor blocks ignores explicitly set widths and heights.

Step-by-step reproduction instructions

  1. Using a Classic Editor block in HTML mode, insert the following HTML which replicates what would have been created under the Classic Editor's Add Media <img src="https://via.placeholder.com/300" width="77" height="77" /> (This is a 300x300 image resized in the editor to 77x77)
  2. Click 'Convert to Blocks'

The end result is a 300x300 image in the content, instead of the 77x77 image that it was resized to.

Screenshots, screen recording, code snippet

No response

Environment info

WordPress 5.8.1 (No Gutenberg plugin)

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Alhrath commented 3 years ago

I have the same problem. I guess most of the lambda users used the "Add media" button and customized sizes to control the display of images in their articles in the classic editor, so I think it's probably quite a common situation. It would be great if this could be corrected before the end of classic editor support :sweat_smile:

Best!

skorasaurus commented 1 year ago

related https://github.com/WordPress/gutenberg/issues/38528