: SEO - background-image and img tag for seo I need to use background-image property so i can use background-size while I also need to use the img tag for SEO-related purposes. Will having the
I need to use background-image property so i can use background-size while I also need to use the img tag for SEO-related purposes. Will having the img tag with display:none; penalize the site for SEO-related purposes?
If it's so, what's the correct way of doing it?
More posts by @Chiappetta492
1 Comments
Sorted by latest first Latest Oldest Best
Google doesn't penalise the page if you use an img tag with "display: none".
Google should still index the image if you use it as part of your CSS, but you can ensure that Google relates it to a specific page with an image sitemap.
Additionally, you can use Google image extensions for sitemaps to give Google more information about the images available on your URLs. Image sitemap information helps Google discover images we might not otherwise find (such as images your site reaches with JavaScript code), and allows you to indicate to Google images on your site that you want Google to crawl and index.
Images are added to a sitemap using <image:image>:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
<url>
<loc>http://example.com/sample.html</loc>
<image:image>
<image:loc>http://example.com/image.jpg</image:loc>
</image:image>
<image:image>
<image:loc>http://example.com/photo.jpg</image:loc>
</image:image>
</url>
</urlset>
For more information about image sitemaps, see:
Image sitemaps — Webmaster Tools Help
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.