Home>Support>How to Automatically Add Default Image Links

How to Automatically Add Default Image Links

I would like to automatically links the image to the media file. I had it before but lost after some uprgades.
I was looking on web but i only found solutions to remove automatically links. However it requires to add code in theme fuctions php. Like that:

function wpb_imagelink_setup() {
2
$image_set = get_option( ‘image_default_link_type’ );
3

4
if ($image_set !== ‘none’) {
5
update_option(‘image_default_link_type’, ‘none’);
6
}
7
}
8
add_action(‘admin_init’, ‘wpb_imagelink_setup’, 10);

Any suggestions how to change code to add atomatically links?

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 9 years, 3 months ago Srikanth Kamath

    one small question.. how does WP + Vantage theme know which image you want to link .from all the images in your media library..?

  2. 9 years, 3 months ago chosendaone

    I guess thumbnail of img1 -> link to full size of img1.
    Anyway my all media files are now linked by manual select “link to media file”. I would like add automatically links for my future posts.

  3. 9 years, 3 months ago Andrew Misplon
    Hi, I Work Here

    Hi Chosendaone

    Thanks for reaching out.

    For all future images you could consider a plugin like this:

    https://wordpress.org/plugins/default-image-link/

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More