: Image hidden, replaced with background image SEO I have images in a gallery. To make it easier for me to crop the images to fit the boxes I want to use background instead of an image. What
I have images in a gallery. To make it easier for me to crop the images to fit the boxes I want to use background instead of an image.
What does Google think of that? Hide an image with visibility: hidden (to get the scale right) and then add a background image to a before element?
It's not ment to trick users, but Google might see hidden content?
More posts by @Nimeshi995
1 Comments
Sorted by latest first Latest Oldest Best
Google (and other bots) will see your html as it is. If you've got it as an image, they'll see it like that. If you Javascript it to the background, they won't notice, so it'll have no effect.
Although, Google (and maybe other bots) are starting to understand javascript. I recommend not hiding the image, simple remove it or load it as background in the first place.
My suggestion in this case would be to just insert it as background from the start. If your html is neat, that bit of alt isnt gonna give you that much juice ;)
Based on your comment and topic, if you make them a fixed size you could save yourself a whole lot work:
.item{
width: 100px;
height:100px;
background: url('image.jpg');
background-size:cover;
}
Background-size to cover alway shows as much image as possible, with the least amount of overflow horizontal or vertical. And is response.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2025 All Rights reserved.