gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Image Size: Remember the last size used.

Open VyxiFaye opened this issue 8 years ago • 23 comments

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

VyxiFaye avatar Aug 07 '18 14:08 VyxiFaye

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

youknowriad avatar Aug 07 '18 15:08 youknowriad

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

VyxiFaye avatar Aug 07 '18 15:08 VyxiFaye

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.

designsimply avatar Nov 27 '18 17:11 designsimply

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.

designsimply avatar Nov 27 '18 17:11 designsimply

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.

ghost avatar Nov 28 '18 13:11 ghost

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!

shuttermuse avatar Jan 10 '19 19:01 shuttermuse

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!

Cliffpro avatar Feb 04 '19 19:02 Cliffpro

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.

mayhemer avatar Mar 03 '19 16:03 mayhemer

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.

gaambo avatar Jul 03 '19 16:07 gaambo

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

mbaierl avatar Jan 30 '20 09:01 mbaierl

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

feastdesignco-user avatar Feb 17 '20 14:02 feastdesignco-user

image

feastdesignco-user avatar Feb 18 '20 09:02 feastdesignco-user

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.

talldan avatar Feb 19 '20 04:02 talldan

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

feastdesignco-user avatar Feb 19 '20 13:02 feastdesignco-user

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

feastdesignco-user avatar Mar 14 '20 14:03 feastdesignco-user

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.

danielbachhuber avatar Apr 28 '20 19:04 danielbachhuber

Who has a solution ?

laurentdebricon avatar Jun 10 '20 08:06 laurentdebricon

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

timoostrich avatar Jun 15 '20 12:06 timoostrich

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

Emilybkk avatar Sep 20 '20 22:09 Emilybkk

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 :)

BoyetDgte avatar Oct 30 '20 09:10 BoyetDgte