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

    (@ahearne)

    Thanks; here is link to image am referring to 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.

    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

    (@ahearne)

    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.

    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

    (@ahearne)

    Hello

    Thank you for the code you supplied. I put it on but it is still not selecting the option I want as default

    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.