Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image Size: Remember the last size used. #8663

Closed
VyxiFaye opened this issue Aug 7, 2018 · 23 comments · Fixed by #29966
Closed

Image Size: Remember the last size used. #8663

VyxiFaye opened this issue Aug 7, 2018 · 23 comments · Fixed by #29966
Assignees
Labels
[Block] Image Affects the Image Block [Feature] Media Anything that impacts the experience of managing media [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Milestone

Comments

@VyxiFaye
Copy link

VyxiFaye commented Aug 7, 2018

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

@youknowriad
Copy link
Contributor

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

@VyxiFaye
Copy link
Author

VyxiFaye commented Aug 7, 2018

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

@designsimply
Copy link
Member

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
Copy link
Member

designsimply commented Nov 27, 2018

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 designsimply added [Feature] Media Anything that impacts the experience of managing media [Block] Image Affects the Image Block and removed [Feature] Blocks Overall functionality of blocks labels Nov 27, 2018
@STHLMWebDesign
Copy link

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.

@shuttermuse
Copy link

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!

@youknowriad youknowriad changed the title Image Size - Change Default Image Size: Remember the last image size used. Jan 11, 2019
@youknowriad youknowriad changed the title Image Size: Remember the last image size used. Image Size: Remember the last size used. Jan 11, 2019
@Cliffpro
Copy link

Cliffpro commented Feb 4, 2019

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!

@youknowriad youknowriad added this to the WordPress 5.x milestone Feb 5, 2019
@mayhemer
Copy link

mayhemer commented Mar 3, 2019

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.

@gaambo
Copy link
Contributor

gaambo commented Jul 3, 2019

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.

@mbaierl
Copy link

mbaierl commented Jan 30, 2020

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

@feastdesignco
Copy link

feastdesignco commented Feb 17, 2020

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.

#20269

@feastdesignco
Copy link

image

@talldan
Copy link
Contributor

talldan commented Feb 19, 2020

#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.

@feastdesignco
Copy link

feastdesignco commented Feb 19, 2020

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, #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 (#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
Copy link

feastdesignco commented Mar 14, 2020

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

@danielbachhuber
Copy link
Member

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.

@laurentdebricon
Copy link

Who has a solution ?

@timoostrich
Copy link

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

@Emilybkk
Copy link

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

@BoyetDgte
Copy link

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

@Mamaduka
Copy link
Member

Hi,

I would like to work on this issue and bring image_default_size into editor settings.

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Mar 18, 2021
@Intervik
Copy link

Still waiting for a solution on this as well. Gutenberg must deliver a way to set default values. Stop creating new "fancy things" and make current editor UX useful. The Gutenberg developers seems to not working with WordPress clients in real life. Lets make Gutenberg less confusing and easier: one way is to release filters in PHP transported into the js enviroment.

@feastdesignco
Copy link

This has been fixed: FiliagoDev/WordPress@53aff53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Image Affects the Image Block [Feature] Media Anything that impacts the experience of managing media [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.