Changing Default Media Link URL (WordPress)

Send Us a Sign! (Contact Us!)
Word PDF Epub Text
XML OpenOffice XPS MHT

When selecting a media from your WordPress Media Library, by default the Link URLselected, is the File URL. Now this may not be ideal if all the images you upload are not going to link to the file, and instead are just images to upload.

[tweet]

Luckily we can change the functionality, but the ability to change the default Link URL is not exposed to the user.

The option specifying the default link type is stored in the WordPress options as “image_default_link_type“.

You can access the hidden WordPress options via visiting http://example.com/wp-admin/options.php (where example.com/ represents the url and path to your blog).

After accessing the page, search for “image_default_link_type” (its in alphabetical order). By default it should say “file“.

This field has a few options:

  • blank (Yes literally nothing, or I just use “none“)
  • file – Use the File URL, ie: http://example.com/wp-content/2010/04/example.png
  • post – Use the Post URL, ie: http://example.com/?attachment=1
  • Change the value to “none”. Do not touch the other options. Once you are done, save the changes by scrolling to the bottom, and hitting “Save Changes”.

    There you have it, your WordPress default media Link URL has been changed.

    SOURCE

    LINK

    LANGUAGE
    ENGLISH