How do I add the Pinterest "nopin" tag to images?

I want to prevent some images on my page from been shared on Pinterest.

I can do that by adding nopin="nopin" to my images. But how can I do that with cornerstone image elements? I can’t figure out how to add extra tags.

This Pinterest help article explains more about nopin if you’re interested: https://help.pinterest.com/en/articles/prevent-people-saving-things-pinterest-your-site

Hi there,

You can not access the img tag directly in the Image Element to add that piece of code. You can use Javascript to add the code but I am not sure if it will work for this case as Javascript applies the attribute you have mentioned after the render of the page.

If you are using the Image Element you need to click on the Customize tab and add the class of nopin in the Class input, if you use the Classic Image Element you will see the Class input directly in the options to add nopin there.

Then go to X > Launch > Options > JS and add the code below:

(function( $ ) {
	$(function() {

		$('.nopin img').attr('nopin', 'nopin');

	});
})(jQuery);

Thank you.

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