Gutenberg: Image Size: Remember the last size used.

Created on 7 Aug 2018  路  20Comments  路  Source: WordPress/gutenberg

It would be nice in future versions if we had the ability to change the image size default settings. In my case, I like my images large and wouldn't want "Thumbnail" as my default size. Would save me a few clicks on each blog post I do.

I currently have v 3.4.0

screenshot_20180807-105805_chrome

[Block] Image [Feature] Media [Type] Enhancement

Most helpful comment

I have this problem too! My expectation is that the image_default_size option would be respected if set, given this is what the Classic Editor supports.

All 20 comments

In my case, it's using "Full" by default, I wonder if this is something plugins/themes are customizing in the media library.

Interesting. I guess I need to poke around more to see what I can find.

Closed #12348 as a duplicate and noting the request to make the "Image Size" setting sticky the same way it currently works in the classic editor.

I tested with WordPress 4.9.8, Gutenberg 4.5.1, and the Twenty Seventeen 1.7 theme using Firefox 63.0.3 on macOS 10.13.6 today and found that images are now inserted as "Large" image size by default.

screen shot 2018-11-27 at 10 42 45 am
Seen at https://tan-otter.jurassic.ninja/wp-admin/post.php?post=120&action=edit with WordPress 4.9.8, Gutenberg 4.5.1, and the Twenty Seventeen 1.7 theme using Firefox 63.0.3 on macOS 10.13.6.

I am running WordPress 4.5.1 with Gutenberg 4.5.1 on a theme I created and Gutenberg always defaults to using large images. Really really want it to behave like the Classic editor and remember what I last used.

Yes, this would be great if it remembered last settings. The "link to" setting often needs to be set to Media so that lightboxes work, but now you have to remember to do it manually for every image. What a pain!

So happy to have found this (I thought I was going crazy), but sad to see there's no update to this yet. As we're growing a blogging team at the office, it'd be nice to let them just work on creative and not have to make sure everyone selected the right image size on upload. A minor inconvenience and nothing dire, but would definitely be a nice setting to have!

I think the 'large' size default pick is hard coded here.

To confirm: removing sizes['large'] via wp_get_attachment_metadata filter forces all new core/image to fallback to the full size setting.

I think the 'large' size default pick is hard coded here.

Actually, I think it's hardcoded here in the DEFAULT_SIZE_SLUG constant. Sadly I don't see a way to change it, but i unset/deleted the large image size and it's selecting full for me by default. I guess it's just the first option in the select list and thats why.

Any update on this? Causes a few more clicks for every single image uploaded...

This needs to be fixed.

Either provide a filter, or add it to "writing" settings page.

Changing the default values in options.php doesn't work either.

https://github.com/WordPress/gutenberg/pull/20269

image

https://github.com/WordPress/gutenberg/issues/15091 mentions using the image_default_size setting. I'm conflicted about whether to close that as a duplicate of this. There seems to be two separate things being discussed:

  • Setting a default value
  • Making the value 'sticky', i.e. the editor remembering the last option used.

That depends on how "sticky" is defined and implemented. The original post here doesn't make any mention of sticky and I think it was a mistake for @designsimply to conflate these two issues.

Similarly, https://github.com/WordPress/gutenberg/issues/8734 is not the same issue either and has mistakenly been tagged as such.

Site-wide settings should be defined via the database (options.php is currently the only method for this). Over-riding those on the block level makes sense, and this is already built into the way that the image block is saved with the parameters inline. eg.

As a user, simply changing the image block once for a particular image, doesn't mean I want that to be the new "default". I don't want my post-level edits to change my site-wide settings. I don't think "sticky" makes sense in this case.

Surfacing the ability to change this default more easily, in the options-media.php would be smart, but separate from this issue.

The scope of this particular issue is not "sticky" settings or the incorrect display of the image size (https://github.com/WordPress/gutenberg/issues/8734), but simply having the image block respect the user-specified image_default_size setting on first insert.

In a cascading preference when inserting the image block:

  1. Use the Wordpress-set DEFAULT_SIZE_SLUG constant for "large" so that we have a starting point
  2. Check for a value in image_default_size (this is default blank on clean installs) and if present, use this value instead

Then rather than DEFAULT_SIZE_SLUG in https://github.com/WordPress/gutenberg/blob/master/packages/block-library/src/image/edit.js on line 201, 233, use the value from step #2

Bump. This is an ongoing problem.

image

Every time somebody inserts an image they have to change the image size. This seems small but at 10 seconds per image x 5 images per post x 2 posts per week x 52 weeks per year this is 86 minutes per year.

Per person. Now multiply that by millions of users.

To change an image size from what should be a user-selected default - that you've _already_ built into Wordpress:
image

@youknowriad any chance of this getting done? @m

I have this problem too! My expectation is that the image_default_size option would be respected if set, given this is what the Classic Editor supports.

Who has a solution ?

I have the same problem. Need to set image_default_size to "full".

Have the same problem. I also want it to be Align : Center by default.

Hi!

I have the same problem. Need to set image_default_size to "full".

Got a way on how to do this. On Settings >> Media, change the value for large to 0. And it will make the full size the default size automatically :)

Was this page helpful?
0 / 5 - 0 ratings