Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#24956 closed enhancement (worksforme)

Shrink image to fit editor column width in WYSIWYG editor

Reported by: pellaeon's profile pellaeon Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Editor Keywords: close
Focuses: Cc:

Description

Images of size 100% (default) are displayed in its full size in the editor. If I upload an large image, I would have to scroll a long distance to reach the contents after the image, this is a little annoying to me.
And I think there is little chance of the author wanting to show the image in its full size, most author just wants it to fit the content column width.
Images are shrinked to fit the content column in most themes even if the image size is set to 100%, so there is little reason to show images in full size in the editor.
Therefore I suggest that Wordpress shrink images to fit the editor column width if the image width exceeds it.

Change History (3)

#1 @jjeaton
11 years ago

  • Cc jjeaton added

#2 @DrewAPicture
11 years ago

  • Keywords close added

This scenario is one of the things that a theme setting the $content_width global guards against. The Visual Editor is a what-you-see-is-close-to-what-you-get viewport, so if your theme hasn't set $content_width, you'll get the true 100% width image.

So for example, in Twenty Thirteen, the $content_width is set to 604px. If I drop an image with 100% width into the editor, it's 100% width of a 604px container. This is a theme issue, suggest close.

#3 @azaozz
11 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Agree with @DrewAPicture, that's why we have support for editor-style.css in themes, so the editor is more wysiwyg.

Note: See TracTickets for help on using tickets.