# Insert Images at Large Size by Default

> Makes new Image blocks and media inserted in the editor use the Large size by default, instead of the full original file.

- Type: PHP
- Runs: Run everywhere
- Category: [Block Editor](https://wpide.com/library/category/gutenberg/)
- Tags: images, editor, defaults
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/default-image-size-large/

## Code

```php
// Default size for inserted images.
$wpide_default_image_size = 'large';

add_filter( 'pre_option_image_default_size', function () use ( $wpide_default_image_size ) {
    return $wpide_default_image_size;
} );
```

## Notes

Change large to medium or another registered size.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Insert Images at Large Size by Default" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
