web hosting
build a website

JQuery Script to force certain og:image

Aug 16, 2015   //   by Anthony Devine   //   Website Development tips  //  No Comments

If you have multiple Facebook og:images on a page that you cant alter here is a script to attempt to force Facebook to use a certain one.

jQuery(document).ready(function() {
jQuery("meta[property='og\\:image']").attr("content", "http://imagelink/commons/thumb/8/82/Dell_Logo.png/1027px-Dell_Logo.png");