• Is there a way to automatically set the default value of image alignment and size upon media upload? I already tried a couple of steps to isolate the issue, but unfortunately nothing works:

    1. I set the default value of image alignment and size in
    2. I added a PHP code in functions.php that will force set the alignment and size of images by default.
    update_option( ‘image_default_align’, ‘center’ );
    update_option( ‘image_default_link_type’, ‘none’ );
    update_option( ‘image_default_size’, ‘full-size’ );
    3. I deactivate all the plugins, to check if there’s any conflict with existing plugins
    4. I changed the theme to ‘Twenty Fifteen’ to isolate if it’s an issue with the theme.
    5. I cleared all cache, checked it in Incognito, and tried in different browser.
    6. I manually set the image alignment and size, then tried to upload a new image, to check if the settings will saved via cache

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • I just did a search for image_default_ in the 5.2.1 code and it is only used in a few places. I think the old editor retained the value last used, but I have heard complaints that the new editor does not.
    The theme is not involved when uploading images, so it’s not your theme, and any code you put in your theme might not be invoked since the theme is not involved.

    You say you changed a core file, so help is limited since you are not using WP the way it was written.

Viewing 1 replies (of 1 total)
  • The topic ‘Image Alignment and Size Default Value’ is closed to new replies.