When you upload images to WordPress using Add Media, WordPress automatically links to the image file. What that means is that when you insert the image, there is a link to the original version of the image you just inserted. If the user clicks that image, WordPress replaces the current page with a page displaying the image. Of course, you can easily override this setting each time you insert an image, but there’s is an easy way to change the default setting to no link.
To change the default WordPress image link setting
- Log into WordPress admin.
- After you are logged into the WordPress admin, paste the following URL in your browser URL field: http://yoursite.com/wp-admin/options.phpWARNING: Do not change any other settings on this screen unless you know what you’re doing.
- Search for the following text: image_default_link_type
- In the field next to image_default_link_type, enter none
Bonus: Change the default WordPress image alignment setting
- Search for the following text: image_default_align
- In the field next to the image_default_align, enter none
For the Adventurous
If you are comfortable editing your theme’s functions.php file, you can use the following code to modify the WordPress default image settings:
/* Change the default image settings */ add_action( 'after_setup_theme', 'wnd_default_image_settings' ); function wnd_default_image_settings() { update_option( 'image_default_align', 'left' ); update_option( 'image_default_link_type', 'none' ); update_option( 'image_default_size', 'large' ); }
Default Settings
- image_default_align: left, right, center, none
- image_default_link_type: media file, attachment page, custom URL, none
- image_default_size: thumbnail, medium, large, full-size
That’s it. Now, when you insert a new image, it will have the default settings you prefer.
DrLightman says
Doesn’t work in my WP 4.9.9