WordPress.org

Make WordPress Core

Opened 12 years ago

Closed 11 years ago

#7119 closed defect (bug) (wontfix)

A full size image inserted into a post should not be resized

Reported by: anmari Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.5.1
Component: Administration Keywords: dev-feedback 2nd-opinion
Focuses: Cc:

Description

An Image inserted into a post as "full size" should have the html width and height of the actual image. In 2.5.1 it resizes the image and not to scale either.

Width and height specifications are desirable for smooth browser display of the page, but if the writer has said "full size" then it should use the images actual sizes, no matter how large they are.

The code to change is apparently in wp-includes/media.php.

Some have advocated allowing a "setting" that specifies the max size, but I suggest if editor says full size, then full size it should be!

Change History (7)

#1 @anmari
12 years ago

Alternatively, the description should be changed to "Max size" to try to reduce user confusion. IE they would then at least be aware that there is a maximum setting that may be being imposed and "squishing" the image.

If the image is being resized to a maximum, then it should be re-sized proportionally to avoid a unprofessional looking result.

#2 @azaozz
12 years ago

The problem with inserting images in full size is that most users upload photos directly from their digital cameras that are far too large and after inserting them in the editor, struggle to resize them to more manageable size.

On the other hand "Full Size" seems a bit misleading when the image is constrained, perhaps could change that to "Large" instead. Also resetting an image to the original size is already supported in the new Edit Image dialog.

#3 @Otto42
12 years ago

-1.

I think that the reason this functionality was added to 2.5 was to create a semblance of sanity for the inexperienced user.

If a user inserts a full sized photo image, then 95% of themes will expand to fit it and therefore look terrible. Then the user has to go screw around to try to resize it properly.

Ideally, a theme would tell WordPress exactly how wide the content area is. By that, I mean that it would specify the maximum width of the area where the post is to be displayed. This functionality is already there, all a theme has to do is include this code in the functions.php file:
$GLOBALScontent_width? = 500;
Where "500" is the maximum width of the content area. WordPress will use that when inserting a "full size" image, and scale appropriately.

Naturally, this is new, so most themes do not include it. 500 is the default value for this number.

Note this comment in wp-inc/media.php:

// we're inserting a full size image into the editor.  if it's a really big image we'll scale it down to fit reasonably
// within the editor itself, and within the theme's content width if it's known.  the user can resize it in the editor
// if they wish.

I largely agree with that idea, and support leaving it alone.

Also, as far as I can tell, it does correctly scale proportionally right now. I inserted a 1000x600 image and got a 500x300 image.

Suggest that we add something to the codex instead, to encourage theme authors to include this value in their themes. Also suggest that default themes be modified to specify this value directly, as an example to theme authors.

#4 @AdrianB
12 years ago

+1

I think it's plain wrong to call it full size and then scale it down. Max size is much better then.

Full size means full size, even for the unexperienced user. It's very confusing for a lot of users, just search wordpress.org. People doesn't know why the images are only 500 px and there's no setting for it. If you don't know how to edit themes then you end up manually changing the size attributes for every image every time.

What if a user uploads and 3000 x 2000 px image and uses full size? Then the huge image is loaded by the browser, but it is only shown at a maximum of 500 px. That's a waste of bandwidth. Better to do a true resize then. And not call it full size.

#5 follow-up: @wodgedean
11 years ago

People may also be using a thumbnail browser like Lightbox to display the image in a new layer. In this situation, the width of the theme doesn't matter.

#6 in reply to: ↑ 5 @Viper007Bond
11 years ago

  • Keywords dev-feedback 2nd-opinion added

Replying to wodgedean:

People may also be using a thumbnail browser like Lightbox to display the image in a new layer. In this situation, the width of the theme doesn't matter.

Your comment is invalid as lightboxes display the image that is linked to, not the image being displayed (the thumbnail usually).

Anyway, since the width/height are hard coded into the HTML based on the GLOBAL of the current theme (i.e. it won't change when you change themes), we might as well make a "thumbnail" of that actual size so the browser doesn't have to resize. New ticket for that: #9737

Recommend closing this particular ticket as wontfix though as I think the vast majority of people don't want images being posted that are wider than their content columns. If they do, then they can just set the GLOBAL to a million pixels.

#7 @Denis-de-Bernardy
11 years ago

  • Milestone 2.9 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

I second the wontfix.

Note: See TracTickets for help on using tickets.