问题原文
原帖链接 · Mikkel Madsen · CC BY-SA 3.0
Hey there :) I'm having some trouble with the design I have from a designer and the need for structured data.
The problem is as follows:
The design of the frontpage has 8 integrated articles that leads to the full article. It has a title, desc, date time published, and they want structured data for the news on the index. But there is no image and on the Google structured data validator it says image is required... Can I just use display:none in css and hide the image, and still setup data for the news/article image? Or will I get in trouble with Google here?
Or should I just tell them that it can only be done on the full article page, where there is a dedicated image to the article.
Maybe I could use the JSON application approach to avoid using display:none;?
I tried looking into the suggested Questions, but didn't find a clear answer. Please mark as duplicate if there is a clear answer out there. Cheers.
Example of what I'm trying to do:
<article itemscope itemType="http://schema.org/NewsArticle">
<header>
<time itemprop="datePublished" datetime="">
</time>
<h1 itemprop="headline">News</h1>
</header>
<div itemprop="articleBody">
<img class="hide-article-img" itemprop="image" src="specific-news-thumbnail.jpg" alt="specific-news-thumbnail desc"/>
<p>This is the content of article.</p>
</div>
<footer>
<a href="#">Læs mere</a>
</footer>
</article>
已采纳解答
原帖链接 · Evgeniy · CC BY-SA 3.0
you should be clear, why do you want to make use of structured data? to go through the testing tool or to deliver correctly formatted and standard conform structured data to search engine, so your site will be included into Google News output?
Google News Article needs image: that's the fact. Why it needs it? To show it to the people. What are solutions?
Don't deliver an image to Google isn't a solution for you, cause your site will not be conform with the News standard and, finally don't be shown in the News.
Display:none; isn't a solution too: Google and users need to see it, and display:none; actively prevent it.
Then the only solution to deliver the image to Google and users and not to actively show it on the site is JSON-LD.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
