WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] uploading media - remove auto link (3 posts)

  1. noname1
    Member
    Posted 6 years ago #

    Hi!
    By default, adding an image to a post also adds a link to the it's own file. I want to remove this, so no link is ever added.

    in wp-includes/media.php, if i change line 303:
    function wp_get_attachment_image_src($attachment_id, $size='thumbnail', $icon = false) {
    to
    function wp_get_attachment_image_src( , $size='thumbnail', $icon = false) {
    will that do the trick?
    m

  2. thx2012
    Member
    Posted 5 years ago #

    What was the solution for this?

    I would like to do the same.

    thanks

  3. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    Just click the "none" button to remove the link before you add the image to the post.

    2.7 will have an optional setting to make it default to this.

Topic Closed

This topic has been closed to new replies.

About this Topic