Title: Image problems
Last modified: October 30, 2018

---

# Image problems

 *  [ahearne](https://wordpress.org/support/users/ahearne/)
 * (@ahearne)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/image-problems-34/)
 * Editing images in a document, say a test.html page, link to Media File is not
   defaulted; it goes to Custom URL – is there anyway I can make Media File default
   and not Custom URL
 * Thanks

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [cleancoded](https://wordpress.org/support/users/cleancoded/)
 * (@cleancoded)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/image-problems-34/#post-10827494)
 * Have a look at your media settings (/wp-admin/options-media.php) and permalink
   settings (/wp-admin/options-permalink.php), click “Save Changes” on both.
 *  Thread Starter [ahearne](https://wordpress.org/support/users/ahearne/)
 * (@ahearne)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/image-problems-34/#post-10827596)
 * Thanks; here is link to image am referring to [http://www.doctorwhoworld.net/Images/screenshot1018.png](http://www.doctorwhoworld.net/Images/screenshot1018.png)-
   is how it is now
 * a) I want it to be Media File by default.
    -  This reply was modified 7 years, 7 months ago by [ahearne](https://wordpress.org/support/users/ahearne/).
 *  [cleancoded](https://wordpress.org/support/users/cleancoded/)
 * (@cleancoded)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/image-problems-34/#post-10827648)
 * Yes, I would recommend removing these URLs, then saving this setting, and after
   that, images should upload to the intended, default file path.
 *  Thread Starter [ahearne](https://wordpress.org/support/users/ahearne/)
 * (@ahearne)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/image-problems-34/#post-10827663)
 * I’m bit confused sorry – I have over 14 thousand pictures to go through and hoped
   be something in functions.php to choose the top option by default.
 *  [cleancoded](https://wordpress.org/support/users/cleancoded/)
 * (@cleancoded)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/image-problems-34/#post-10827801)
 * To update the default link type of images moving forward, you can do this by 
   accessing your site options at yourdomain/wp-admin/options.php
 * Scroll down and find the image_default_link_type field. You have 4 choices:
    1. none – This links back to the post it was uploaded to
    2. file – This links to the image file in your wp-content/uploads folder
    3. post – This links back to the post it was uploaded to
    4. attachment – This links to an attachment post generated by WordPress for all
       image files uploaded to a post
 * You can also do this with a function in functions.php:
 *     ```
       function mytheme_setup() {
        update_option('image_default_link_type', 'file' );
   
       }
       add_action('after_setup_theme', 'mytheme_setup');
       ```
   
 *  Thread Starter [ahearne](https://wordpress.org/support/users/ahearne/)
 * (@ahearne)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/image-problems-34/#post-10827906)
 * Hello
 * Thank you for the code you supplied. I put it on but it is still not selecting
   the option I want as default
 *  [cleancoded](https://wordpress.org/support/users/cleancoded/)
 * (@cleancoded)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/image-problems-34/#post-10827967)
 * Please have a look at this quick video I just created, which walks through this
   update. In the video, I create a brand new WordPress install and create a test
   post with an uploaded image to show the default behavior of no link being added
   by default.
 * Then, I copy the code above, from my previous answer, and add it to the active
   theme’s functions.php file.
 * Then, I create a new test post, and upload an image to show the link behavior
   is updated to using the media file URL by default:

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Image problems’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 2 participants
 * Last reply from: [cleancoded](https://wordpress.org/support/users/cleancoded/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/image-problems-34/#post-10827967)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
