[wp-trac] Re: [WordPress Trac] #7119: A full size image inserted
into a post should not be resized
WordPress Trac
wp-trac at lists.automattic.com
Thu Jun 12 14:00:34 GMT 2008
#7119: A full size image inserted into a post should not be resized
----------------------------+-----------------------------------------------
Reporter: anmari | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.6
Component: Administration | Version: 2.5.1
Severity: normal | Resolution:
Keywords: |
----------------------------+-----------------------------------------------
Comment (by Otto42):
-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:
$GLOBALS['content_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.
--
Ticket URL: <http://trac.wordpress.org/ticket/7119#comment:3>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list