Site logo

[Resolved] Default link to file media on WordPress

Home Forums Support [Resolved] Default link to file media on WordPress

Home Forums Support Default link to file media on WordPress

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1714901
    Alessandro

    Good morning,
    from 5 March 2021 until today on different wordpress installations (different domains and hosting), by default WordPress when I insert an image automatically inserts the link to the url file, by default.

    This WordPress feature belongs to old installations, which was later removed in the course of updates.
    At the moment I use the version of WordPress 5.6.2, could you tell me why it happens?

    Thanks

    #1715168
    David
    Staff
    Customer Support

    Hi there,

    i am not sure i understand … are you wanting to automatically add a link to each image or are you trying to remove this ?

    The theme itself has no responsibility over this … its a WP core function.

    #1715177
    Alessandro

    Hi, David,
    all articles published from that date on have linked images.
    it’s as if wordpress decided after that date to insert links to media files, when by default it shouldn’t.
    I opened a ticket because on all 3 sites I manage, this has happened and they have generated press on board.
    I asked here in the forum to find out if the same thing happened to anyone.
    Now when I publish an article containing images I have to select each image and remove the link automatically inserted by wordpress.

    I apologize if I’m off topic.

    #1715567
    Leo
    Staff
    Customer Support

    I’ve never heard of this issue before and GP definitely doesn’t do something like this.

    As David mentioned, the featured image option is handled by WordPress completely.

    Perhaps there is a custom function or plugin causing the issue?

    I’d imagine the same issue occurs when using a Twenty series WP theme as well.

    #1715578
    Alessandro

    ok thanks

    #1715642
    Leo
    Staff
    Customer Support

    No problem 🙂

    #1717540
    Alessandro

    Find the solutions:
    https://wordpress.stackexchange.com/questions/327396/set-default-image-link-target-in-gutenberg-image-block

    use this code in functions.php:

    add_action( 'after_setup_theme', function() {
        update_option( 'image_default_link_type', 'none' );
    });
    #1718130
    Leo
    Staff
    Customer Support

    Thanks for sharing 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.