I have a client that wants images to automatically be centered. This used to be possible with the image_default_align option for the old editor. Is there a simple way to change the default attributes for core blocks?

  • Gutenberg already have a align center option that appears on toolbar. You can add your editor styles via hook for some custom styling. Mar 11, 2019 at 21:19
  • Thanks @MehmoodAhmad I know the center options is there. My clients wants center to be the default for the image block. I would like to change this default attribute.
    – Nate
    Mar 13, 2019 at 1:41
  • I think it can be achievable via Block Filters (developer.wordpress.org/block-editor/developers/filters/…), but I'm not sure. Still working on this myself. Nov 16, 2019 at 17:08


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.