Can you help with this please: Lighthouse Report says 'Links to cross-origin destinations are unsafe'

Hi, I’ve done a Lighthouse Report on one of our sites and in the ‘Best Practices’ section it has marked us down saying ‘Links to cross-origin destinations are unsafe’. This is referring to image elements I’ve used with a link and selected ‘New Tab’. It’s saying I need to do the following:

How to improve your site’s performance and prevent security vulnerabilities #

Add rel="noopener" or rel="noreferrer" to each link identified in your Lighthouse report. In general, when you use target="_blank" , always add rel="noopener" or rel="noreferrer" :

<a href="https://examplepetstore.com" target="_blank" rel="noopener">  Example Pet Store</a>

I can’t see where there’s an option for me to add the rel="noopener" there’s just the option next to ‘New Tab’ for ‘nofollow’ which isn’t the same. Can you let me know how I can go about adding the rel="noopener" to any image links and buttons please.

Here’s a screen grab of the ‘Best Practices’ section on the Lighthouse Report I’m referring to. I’ll add the URL in a secure note.

Thanks!

Hello @core365,

Thank you for the very detailed post information.

When using the image element and enabling the Link option, you can add the rel="noreferrer" as an attribute to the element. Simply click the image element and find the “Customize” tab. Look for the Custom Attribute option and insert the rel="noreferrer" like this:

Screen Shot 2021-09-03 at 7.06.06 AM

Screen Shot 2021-09-03 at 7.06.31 AM

This will be the output of the image element.

Kindly let us know how it goes.

Hi @ruenel,

That’s great, thanks for the explanation and instructions! I’ve done that to the images and buttons and it’s worked, but would you know how I go about doing it for the Envira gallery links, as I’ve got links from each image in the gallery to go to external websites and I’d need to add the rel="noopener" on each of those too, but I can’t find anything in the settings to do this. Hope you can help!

Thanks!

Hi @core365,

Unfortunately, there is no such option to add the rel attribute to each image of the Envira Gallery.

Thanks

Hi @tristup,

Ok, thanks for letting me know!

Cheers

You’re welcome, @core365

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.