Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#30269 closed enhancement (invalid)

Expose an option to customize the default image size when inserting an image into a post

Reported by: andresma's profile andresma Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Media Keywords:
Focuses: ui, administration, template Cc:


When inserting a new image into a post the default size is set to "full size", and this is a problem because the file size of the image can potentially be very big (like ~3MB or more).

The request is to add a "setting" that allows administrators to define a "default image size" for posts. I also suggest that this setting is set to use "large" size instead of "full" by default.

Many users don't even realize that using the "full" size of a picture can be a problem because the Editor re-sizes the "displayed" image to a smaller size on the screen so they don't even know that the actual size of the image is like 10 times bigger. All they know is that their blog is now "slow" after they inserted a couple of pictures in their posts.

With this setting the user will still be able to choose "full" size if they really want it.

The change will involve modifying the code of this file:

which has a hardcoded default size of "full":
<option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, 'full' ); ?>

Change History (2)

#1 @iseulde
10 years ago

  • Component changed from Editor to Media
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
  • Version 4.0 deleted

This can be done by forcing the imgsize user setting/option.

Last edited 10 years ago by iseulde (previous) (diff)

#2 @iseulde
10 years ago

P.S. By default the size is medium. This only changes after the user has selected a different size (which is saved as a user preference). You could force this preference so that, even after the user selected another size before, the next time it will be the size you set. Take a look at the imgsize user setting.

Note: See TracTickets for help on using tickets.