Opening Image Link in New Tab

Hey all! Right now I can add a link to an image but every time I click the image, it just uses the current tab/session to open the link. Is there a way so that when I click the image, it opens the link on another tab instead? Thanks so much!

You can use the following js in your code injection area,

$(document).ready(function () {
    $('.kg-image-card a').attr('target', '_blank');

I tried putting it in the site header and footer section and for some reason, it still does not open on a new tab