Closed dak closed 8 years ago
This is a duplicate: https://github.com/RealFaviconGenerator/rfg-api/issues/4
For anyone having the same issue, as I did after adding open graph tags to an old project:
const realFaviconOptions = {
keep: 'meta[property="og:image"]'
};
function favicons() {
return gulp.src(paths.html.src)
.pipe(realFavicon.injectFaviconMarkups(
JSON.parse(fs.readFileSync(FAVICON_DATA_FILE)).favicon.html_code,
realFaviconOptions))
.pipe(gulp.dest(paths.html.dest));
}
If a different image is being used for
og:image
and it is already defined in HTML that is parsed byinjectFaviconMarkups
, the tag is removed (even if there is no replacement tag).twitter:image
is not being removed.OpenGraph images tend to be something different than a site's favicon, as they are quite larger, and use a different aspect ratio. RealFavicon should be respecting pre-existing tags.