Open Pcosta88 opened 6 years ago
The issue is reproduced in Yoast SEO 8.4.
@moorscode Can you please get more context on this issue?
The Cover image is currently being rendered as background-image
in the CSS. This means that it is not in an <img
tag and lacks alt
or src-set
attributes.
@jono-alderson can you provide insights in how this affects SEO indexation for such an image and if we should ignore or somehow include this in our analyses.
Example output:
<div class="wp-block-cover-image" style="background-image:url(http://local.wordpress.test/wp-content/uploads/2018/06/b117ef7fc4ed851f99f23f10795b2010.jpg)"><p class="wp-block-cover-image-text">Cover Image Title<br/><br/></p></div>
My general thoughts are that, if an image conveys meaning, it should be in an image tag. If it's just decorative, a background is fine.
Historically, large cover style images have been implemented via CSS in order to attain levels of styling capabilities/flexibility which have been historically difficult to achieve via an image tag, without relying on js. Nowadays, image tags are flexible enough.
As such:
1) I don't think we should be analysing images in backgrounds, as, semantically, these aren't/shouldn't be part of the flow.
2) We should educate on this.
3) even if we did want to analyse these, how do we do so reliably and robustly? Where do we draw the line between "image we should analyse", and, "jpg background on an element"? How do we discern the intent?
So for a very small change, the copy could be adjusted to "No usable images appear on this page" and the article could explain which images are SEO worthy and which are not.
I like it.
Please give us a description of what happened.
The analysis fails to detect Images in a Cover Image Block
Please describe what you expected to happen and why.
It would
How can we reproduce this behavior?
1.Create a post and add in a Cover Image Block
2.See Yoast not detect image
Technical info